refactor: mojofy MessageTo and MessageHost (#17613)
This commit is contained in:
parent
5d45b59f7f
commit
127b87c713
7 changed files with 82 additions and 95 deletions
|
@ -479,6 +479,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
// RenderFrameHost is destroyed, all related bindings will be removed.
|
||||
void BindElectronBrowser(mojom::ElectronBrowserRequest request,
|
||||
content::RenderFrameHost* render_frame_host);
|
||||
void OnElectronBrowserConnectionError();
|
||||
|
||||
uint32_t GetNextRequestId() { return ++request_id_; }
|
||||
|
||||
|
@ -495,23 +496,16 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
const std::string& channel,
|
||||
base::Value arguments,
|
||||
MessageSyncCallback callback) override;
|
||||
void MessageTo(bool internal,
|
||||
bool send_to_all,
|
||||
int32_t web_contents_id,
|
||||
const std::string& channel,
|
||||
base::Value arguments) override;
|
||||
void MessageHost(const std::string& channel, base::Value arguments) override;
|
||||
|
||||
// Called when we receive a CursorChange message from chromium.
|
||||
void OnCursorChange(const content::WebCursor& cursor);
|
||||
|
||||
// Called when received a message from renderer to be forwarded.
|
||||
void OnRendererMessageTo(content::RenderFrameHost* frame_host,
|
||||
bool internal,
|
||||
bool send_to_all,
|
||||
int32_t web_contents_id,
|
||||
const std::string& channel,
|
||||
const base::ListValue& args);
|
||||
|
||||
// Called when received a message from renderer to host.
|
||||
void OnRendererMessageHost(content::RenderFrameHost* frame_host,
|
||||
const std::string& channel,
|
||||
const base::ListValue& args);
|
||||
|
||||
// Called when received a synchronous message from renderer to
|
||||
// set temporary zoom level.
|
||||
void OnSetTemporaryZoomLevel(content::RenderFrameHost* frame_host,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue