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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2506183002: Make window.open() IPCs be frame-based (Closed)
Patch Set: Compile fix. Created 4 years 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: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f68bb2e5666f71404361907fd889992464b5d5cf..3c29f81a403ecfa7388274e9a4637cdc22fa6ca9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6656,6 +6656,24 @@ void RenderFrameImpl::OnSetPepperVolume(int32_t pp_instance, double volume) {
}
#endif // ENABLE_PLUGINS
+void RenderFrameImpl::ShowCreatedWindow(bool opened_by_user_gesture,
+ RenderWidget* render_widget_to_show,
+ WebNavigationPolicy policy,
+ const gfx::Rect& initial_rect) {
+ // |render_widget_to_show| is the main RenderWidget for a pending window
+ // created by this object, but not yet shown. The tab is currently offscreen,
+ // and still owned by the opener. Sending |FrameHostMsg_ShowCreatedWindow|
+ // will move it off the opener's pending list, and put it in its own tab or
+ // window.
+ //
+ // This call happens only for renderer-created windows; for example, when a
+ // tab is created by script via window.open().
+ Send(new FrameHostMsg_ShowCreatedWindow(
+ GetRoutingID(), render_widget_to_show->routing_id(),
+ RenderViewImpl::NavigationPolicyToDisposition(policy), initial_rect,
alexmos 2016/12/13 18:41:41 Would it make sense to also move NavigationPolicyT
ncarter (slow) 2016/12/15 00:33:17 I actually looked into this before you even mentio
alexmos 2016/12/15 18:36:48 Acknowledged.
+ opened_by_user_gesture));
+}
+
void RenderFrameImpl::RenderWidgetSetFocus(bool enable) {
#if BUILDFLAG(ENABLE_PLUGINS)
// Notify all Pepper plugins.

Powered by Google App Engine
This is Rietveld 408576698