aboutsummaryrefslogtreecommitdiffstats
path: root/ports/servoshell/egl/host_trait.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-02-03 23:31:17 +0100
committerGitHub <noreply@github.com>2025-02-03 22:31:17 +0000
commitfdfaf7b15c74358976f6df588217ca2344f3944b (patch)
tree8fa6811df16eefb12f77b6e7db7c748a5617f219 /ports/servoshell/egl/host_trait.rs
parentb8ab820e3c3318011d7f35acc586e650bc5b8f27 (diff)
downloadservo-fdfaf7b15c74358976f6df588217ca2344f3944b.tar.gz
servo-fdfaf7b15c74358976f6df588217ca2344f3944b.zip
libservo: Combine `LoadStart, `HeadParsed`, and `LoadComplete` messages (#35260)
These will be a single method in the upcoming `WebView` delegate, so it makes sense to also combine the internal message to match this. In addition, since `LoadStatus` is now exposed to the API if there is ever the need to add more statuses or to move to an event-based version, the API is already set up for this. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'ports/servoshell/egl/host_trait.rs')
-rw-r--r--ports/servoshell/egl/host_trait.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/ports/servoshell/egl/host_trait.rs b/ports/servoshell/egl/host_trait.rs
index bc18a48572b..7d6ee078bea 100644
--- a/ports/servoshell/egl/host_trait.rs
+++ b/ports/servoshell/egl/host_trait.rs
@@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use servo::webrender_api::units::DeviceIntRect;
-use servo::{InputMethodType, MediaSessionPlaybackState, PromptResult};
+use servo::{InputMethodType, LoadStatus, MediaSessionPlaybackState, PromptResult};
/// Callbacks. Implemented by embedder. Called by Servo.
pub trait HostTrait {
@@ -17,16 +17,16 @@ pub trait HostTrait {
fn prompt_input(&self, msg: String, default: String, trusted: bool) -> Option<String>;
/// Show context menu
fn show_context_menu(&self, title: Option<String>, items: Vec<String>);
- /// Page starts loading.
- /// "Reload button" should be disabled.
- /// "Stop button" should be enabled.
- /// Throbber starts spinning.
- fn on_load_started(&self);
- /// Page has loaded.
- /// "Reload button" should be enabled.
- /// "Stop button" should be disabled.
- /// Throbber stops spinning.
- fn on_load_ended(&self);
+ /// Notify that the load status of the page has changed.
+ /// Started:
+ /// - "Reload button" should be disabled.
+ /// - "Stop button" should be enabled.
+ /// - Throbber starts spinning.
+ /// Complete:
+ /// - "Reload button" should be enabled.
+ /// - "Stop button" should be disabled.
+ /// - Throbber stops spinning.
+ fn notify_load_status_changed(&self, load_status: LoadStatus);
/// Page title has changed.
fn on_title_changed(&self, title: Option<String>);
/// Allow Navigation.