fix stale rebase
This commit is contained in:
parent
7e7634d344
commit
b08d086b0f
2 changed files with 0 additions and 44 deletions
|
@ -95,13 +95,9 @@ void AtomJavaScriptDialogManager::OnMessageBoxCallback(
|
||||||
const std::string& origin,
|
const std::string& origin,
|
||||||
int code,
|
int code,
|
||||||
bool checkbox_checked) {
|
bool checkbox_checked) {
|
||||||
<<<<<<< HEAD
|
|
||||||
if (checkbox_checked)
|
if (checkbox_checked)
|
||||||
origin_counts_[origin] = kUserWantsNoMoreDialogs;
|
origin_counts_[origin] = kUserWantsNoMoreDialogs;
|
||||||
callback.Run(code == 0, base::string16());
|
callback.Run(code == 0, base::string16());
|
||||||
=======
|
|
||||||
std::move(callback).Run(code == 0, base::string16());
|
|
||||||
>>>>>>> Calling non-const callbacks requires some tricks
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -125,46 +125,6 @@ void AtomRenderFrameObserver::OnDestruct() {
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomRenderFrameObserver::OnMessageReceived(const IPC::Message& message) {
|
|
||||||
bool handled = true;
|
|
||||||
IPC_BEGIN_MESSAGE_MAP(AtomRenderFrameObserver, message)
|
|
||||||
IPC_MESSAGE_HANDLER(AtomFrameMsg_Message, OnBrowserMessage)
|
|
||||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
|
||||||
IPC_END_MESSAGE_MAP()
|
|
||||||
|
|
||||||
return handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AtomRenderFrameObserver::OnBrowserMessage(bool send_to_all,
|
|
||||||
const base::string16& channel,
|
|
||||||
const base::ListValue& args) {
|
|
||||||
blink::WebLocalFrame* frame = render_frame_->GetWebFrame();
|
|
||||||
if (!frame || !render_frame_->IsMainFrame())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Don't handle browser messages before document element is created.
|
|
||||||
// When we receive a message from the browser, we try to transfer it
|
|
||||||
// to a web page, and when we do that Blink creates an empty
|
|
||||||
// document element if it hasn't been created yet, and it makes our init
|
|
||||||
// script to run while `window.location` is still "about:blank".
|
|
||||||
blink::WebDocument document = frame->GetDocument();
|
|
||||||
blink::WebElement html_element = document.DocumentElement();
|
|
||||||
if (html_element.IsNull()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
EmitIPCEvent(frame, channel, args);
|
|
||||||
|
|
||||||
// Also send the message to all sub-frames.
|
|
||||||
if (send_to_all) {
|
|
||||||
for (blink::WebFrame* child = frame->FirstChild(); child;
|
|
||||||
child = child->NextSibling())
|
|
||||||
if (child->IsWebLocalFrame()) {
|
|
||||||
EmitIPCEvent(child->ToWebLocalFrame(), channel, args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AtomRenderFrameObserver::CreateIsolatedWorldContext() {
|
void AtomRenderFrameObserver::CreateIsolatedWorldContext() {
|
||||||
auto frame = render_frame_->GetWebFrame();
|
auto frame = render_frame_->GetWebFrame();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue