fix: make devtools extensions load correctly (#17614)
This commit is contained in:
parent
d597a0e8b0
commit
75442b794f
4 changed files with 26 additions and 8 deletions
|
@ -1649,13 +1649,24 @@ bool WebContents::SendIPCMessageWithSender(bool internal,
|
|||
const std::string& channel,
|
||||
const base::ListValue& args,
|
||||
int32_t sender_id) {
|
||||
auto* frame_host = web_contents()->GetMainFrame();
|
||||
if (frame_host) {
|
||||
return frame_host->Send(new AtomFrameMsg_Message(frame_host->GetRoutingID(),
|
||||
internal, send_to_all,
|
||||
channel, args, sender_id));
|
||||
std::vector<content::RenderFrameHost*> target_hosts;
|
||||
if (!send_to_all) {
|
||||
auto* frame_host = web_contents()->GetMainFrame();
|
||||
if (frame_host) {
|
||||
target_hosts.push_back(frame_host);
|
||||
}
|
||||
} else {
|
||||
target_hosts = web_contents()->GetAllFrames();
|
||||
}
|
||||
return false;
|
||||
|
||||
bool handled = false;
|
||||
for (auto* frame_host : target_hosts) {
|
||||
handled = frame_host->Send(
|
||||
new AtomFrameMsg_Message(frame_host->GetRoutingID(), internal,
|
||||
false, channel, args, sender_id)) ||
|
||||
handled;
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
bool WebContents::SendIPCMessageToFrame(bool internal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue