Move GetDocument method from WebFrame to WebLocalFrame.
https://codereview.chromium.org/2928033002
This commit is contained in:
parent
7608a0489c
commit
61797b7802
1 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ void AtomRenderViewObserver::OnBrowserMessage(bool send_to_all,
|
|||
return;
|
||||
|
||||
blink::WebFrame* frame = render_view()->GetWebView()->MainFrame();
|
||||
if (!frame || frame->IsWebRemoteFrame())
|
||||
if (!frame || !frame->IsWebLocalFrame())
|
||||
return;
|
||||
|
||||
// Don't handle browser messages before document element is created.
|
||||
|
@ -157,7 +157,7 @@ void AtomRenderViewObserver::OnBrowserMessage(bool send_to_all,
|
|||
// 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::WebDocument document = frame->ToWebLocalFrame()->GetDocument();
|
||||
blink::WebElement html_element = document.DocumentElement();
|
||||
if (html_element.IsNull()) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue