mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
EmbedderMsg: port reply channels to GenericChannel (#39018)
This change ports all `EmbedderMsg` reply channels that don't use the `ROUTER` to GenericChannel. The remaining reply channels that use the router are blocked until #38973 is merged. This is a breaking change in the API between libservo and embedders. Future work: A lot of the reply channels in this PR look like they conceptually should be oneshot ipc channels. It might make sense to provide a `OneshotGenericChannel` abstraction that encodes this. Testing: No functional changes - covered by existing tests. None of the channels changed here uses the Router Part of #38912 --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
89e1357c75
commit
66d9f957e6
20 changed files with 107 additions and 95 deletions
|
@ -9,6 +9,7 @@ use std::mem;
|
|||
use std::rc::Rc;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use base::generic_channel;
|
||||
use constellation_traits::ScriptToConstellationMessage;
|
||||
use embedder_traits::{
|
||||
Cursor, EditingActionEvent, EmbedderMsg, GamepadEvent as EmbedderGamepadEvent,
|
||||
|
@ -689,7 +690,8 @@ impl DocumentEventHandler {
|
|||
|
||||
// Step 4. If result is true, then show the UA context menu
|
||||
if result {
|
||||
let (sender, receiver) = ipc::channel().expect("Failed to create IPC channel.");
|
||||
let (sender, receiver) =
|
||||
generic_channel::channel().expect("Failed to create IPC channel.");
|
||||
self.window.send_to_embedder(EmbedderMsg::ShowContextMenu(
|
||||
self.window.webview_id(),
|
||||
sender,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue