Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
diff --git a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
index 77440eef9d697bf08d4e6f2522866feebbaa5d77..ddba6ea548e591494c3faa46be905ea96a6d52f4 100644
--- a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
+++ b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
@@ -342,14 +342,7 @@ void GuestViewInternalCustomBindings::GetContentWindow(
return;
blink::WebFrame* frame = view->GetWebView()->MainFrame();
- // TODO(lazyboy,nasko): The WebLocalFrame branch is not used when running
- // on top of out-of-process iframes. Remove it once the code is converted.
- v8::Local<v8::Value> window;
- if (frame->IsWebLocalFrame()) {
- window = frame->MainWorldScriptContext()->Global();
- } else {
- window = frame->ToWebRemoteFrame()->GlobalProxy();
- }
+ v8::Local<v8::Value> window = frame->GlobalProxy();
args.GetReturnValue().Set(window);
}

Powered by Google App Engine
This is Rietveld 408576698