mirror of
https://github.com/servo/servo.git
synced 2025-09-23 13:20:11 +01:00
libservo: Port desktop servoshell to use the new WebView
API (#35183)
This removes all uses of `EmbedderEvent` in the desktop servoshell to use the new `WebView` API -- filling it out when necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
a1cf0cbf86
commit
9dbc942bee
15 changed files with 826 additions and 798 deletions
|
@ -427,19 +427,19 @@ impl BackgroundHangMonitorWorker {
|
|||
},
|
||||
recv(self.control_port) -> event => {
|
||||
match event {
|
||||
Ok(BackgroundHangMonitorControlMsg::EnableSampler(rate, max_duration)) => {
|
||||
println!("Enabling profiler.");
|
||||
self.sampling_duration = Some(rate);
|
||||
self.sampling_max_duration = Some(max_duration);
|
||||
self.sampling_baseline = Instant::now();
|
||||
Ok(BackgroundHangMonitorControlMsg::ToggleSampler(rate, max_duration)) => {
|
||||
if self.sampling_duration.is_some() {
|
||||
println!("Enabling profiler.");
|
||||
self.finish_sampled_profile();
|
||||
self.sampling_duration = None;
|
||||
} else {
|
||||
println!("Disabling profiler.");
|
||||
self.sampling_duration = Some(rate);
|
||||
self.sampling_max_duration = Some(max_duration);
|
||||
self.sampling_baseline = Instant::now();
|
||||
}
|
||||
None
|
||||
},
|
||||
Ok(BackgroundHangMonitorControlMsg::DisableSampler) => {
|
||||
println!("Disabling profiler.");
|
||||
self.finish_sampled_profile();
|
||||
self.sampling_duration = None;
|
||||
return true;
|
||||
},
|
||||
Ok(BackgroundHangMonitorControlMsg::Exit(sender)) => {
|
||||
for component in self.monitored_components.values_mut() {
|
||||
component.exit_signal.signal_to_exit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue