refactor: use mojo for electron internal IPC (#17406)
* refactor: use mojo for electron internal IPC * add sender_id, drop MessageSync * remove usages of AtomFrameMsg_Message * iwyu * first draft of renderer->browser direction * refactor to reuse a single ipc interface * implement TakeHeapSnapshot through mojo * the rest of the owl^WtakeHeapSnapshot mojofication * remove no-op overrides in AtomRendererClient * delete renderer-side ElectronApiServiceImpl when its pipe is destroyed * looks like we don't need to overlay the renderer manifest after all * don't try to send 2 replies to a sync rpc * undo changes to manifests.cc * unify sandboxed + unsandboxed ipc events * lint * register ElectronBrowser mojo service on devtools WebContents * fix takeHeapSnapshopt failure paths * {electron_api => atom}::mojom * add send_to_all to ElectronRenderer::Message * keep interface alive until callback is called * review comments * use GetContext from RendererClientBase * robustify a test that uses window.open * MessageSync posts a task to put sync messages in the same queue as async ones * add v8::MicrotasksScope and node::CallbackScope * iwyu * use weakptr to api::WebContents instead of Unretained * make MessageSync an asynchronous message & use non-associated interface * iwyu + comments * remove unused WeakPtrFactory * inline OnRendererMessage[Sync] * cleanups & comments * use helper methods instead of inline lambdas * remove unneeded async in test * add mojo to manifests deps * add gn check for //electron/manifests and mojo * don't register renderer side service until preload has been run * update gn check targets list * move interface registration back to RenderFrameCreated
This commit is contained in:
parent
5b696491db
commit
53f6cbccbf
32 changed files with 620 additions and 401 deletions
|
@ -25,17 +25,6 @@ IPC_STRUCT_TRAITS_BEGIN(atom::DraggableRegion)
|
|||
IPC_STRUCT_TRAITS_MEMBER(bounds)
|
||||
IPC_STRUCT_TRAITS_END()
|
||||
|
||||
IPC_MESSAGE_ROUTED3(AtomFrameHostMsg_Message,
|
||||
bool /* internal */,
|
||||
std::string /* channel */,
|
||||
base::ListValue /* arguments */)
|
||||
|
||||
IPC_SYNC_MESSAGE_ROUTED3_1(AtomFrameHostMsg_Message_Sync,
|
||||
bool /* internal */,
|
||||
std::string /* channel */,
|
||||
base::ListValue /* arguments */,
|
||||
base::ListValue /* result */)
|
||||
|
||||
IPC_MESSAGE_ROUTED5(AtomFrameHostMsg_Message_To,
|
||||
bool /* internal */,
|
||||
bool /* send_to_all */,
|
||||
|
@ -47,13 +36,6 @@ IPC_MESSAGE_ROUTED2(AtomFrameHostMsg_Message_Host,
|
|||
std::string /* channel */,
|
||||
base::ListValue /* arguments */)
|
||||
|
||||
IPC_MESSAGE_ROUTED5(AtomFrameMsg_Message,
|
||||
bool /* internal */,
|
||||
bool /* send_to_all */,
|
||||
std::string /* channel */,
|
||||
base::ListValue /* arguments */,
|
||||
int32_t /* sender_id */)
|
||||
|
||||
IPC_MESSAGE_ROUTED0(AtomViewMsg_Offscreen)
|
||||
|
||||
IPC_MESSAGE_ROUTED3(AtomAutofillFrameHostMsg_ShowPopup,
|
||||
|
@ -85,7 +67,3 @@ IPC_SYNC_MESSAGE_ROUTED0_1(AtomFrameHostMsg_GetZoomLevel, double /* result */)
|
|||
IPC_MESSAGE_ROUTED2(AtomFrameHostMsg_PDFSaveURLAs,
|
||||
GURL /* url */,
|
||||
content::Referrer /* referrer */)
|
||||
|
||||
IPC_MESSAGE_ROUTED2(AtomFrameMsg_TakeHeapSnapshot,
|
||||
IPC::PlatformFileForTransit /* file_handle */,
|
||||
std::string /* channel */)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue