Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_delegate.h |
| diff --git a/content/browser/frame_host/render_frame_host_delegate.h b/content/browser/frame_host/render_frame_host_delegate.h |
| index a22a5bf05e9dca007b58aecf23ff4a73a8891e61..7a2cbffbe01f4650888a6ce9d480f431fb6e9c80 100644 |
| --- a/content/browser/frame_host/render_frame_host_delegate.h |
| +++ b/content/browser/frame_host/render_frame_host_delegate.h |
| @@ -20,6 +20,7 @@ |
| #include "content/public/common/media_stream_request.h" |
| #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" |
| #include "net/http/http_response_headers.h" |
| +#include "ui/base/window_open_disposition.h" |
| #if defined(OS_WIN) |
| #include "ui/gfx/native_widget_types.h" |
| @@ -36,18 +37,31 @@ class GeolocationServiceContext; |
| class WakeLockServiceContext; |
| } |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +namespace mojom { |
| +class CreateNewWindowParams; |
|
alexmos
2016/12/13 18:41:40
Is this one needed? There's one defined below in
ncarter (slow)
2016/12/15 00:33:16
Done.
|
| +} |
| + |
| namespace content { |
| class FrameTreeNode; |
| class InterstitialPage; |
| class PageState; |
| class RenderFrameHost; |
| class ScreenOrientationProvider; |
| +class SessionStorageNamespace; |
| class WebContents; |
| struct AXEventNotificationDetails; |
| struct AXLocationChangeNotificationDetails; |
| struct ContextMenuParams; |
| struct FileChooserParams; |
| +namespace mojom { |
| +class CreateNewWindowParams; |
| +} |
| + |
| // An interface implemented by an object interested in knowing about the state |
| // of the RenderFrameHost. |
| class CONTENT_EXPORT RenderFrameHostDelegate { |
| @@ -211,6 +225,44 @@ class CONTENT_EXPORT RenderFrameHostDelegate { |
| virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( |
| const GURL& url); |
| + // The page is trying to open a new page (e.g. a popup window). The window |
| + // should be created associated with the given |route_id| in the process of |
|
alexmos
2016/12/13 18:41:40
Update |route_id|.
ncarter (slow)
2016/12/15 00:33:16
Done.
|
| + // |source_site_instance|, but it should not be shown yet. That |
| + // should happen in response to ShowCreatedWindow. |
| + // |params.window_container_type| describes the type of RenderViewHost |
| + // container that is requested -- in particular, the window.open call may |
| + // have specified 'background' and 'persistent' in the feature string. |
| + // |
| + // The passed |params.frame_name| parameter is the name parameter that was |
| + // passed to window.open(), and will be empty if none was passed. |
| + // |
| + // Note: this is not called "CreateWindow" because that will clash with |
| + // the Windows function which is actually a #define. |
| + // |
| + // The caller is expected to handle cleanup if this operation fails or is |
| + // suppressed, by looking for the existence of a RenderFrameHost in |
| + // source_site_instance's process with |main_frame_route_id| after this method |
| + // returns. |
| + virtual void CreateNewWindow( |
| + SiteInstance* source_site_instance, |
| + int32_t render_view_route_id, |
| + int32_t main_frame_route_id, |
| + int32_t main_frame_widget_route_id, |
| + const mojom::CreateNewWindowParams& params, |
| + SessionStorageNamespace* session_storage_namespace) {} |
| + |
| + // Show a previously created page with the specified disposition and bounds. |
| + // The window is identified by the |main_frame_widget_route_id| passed to |
| + // CreateNewWindow. |
| + // |
| + // Note: this is not called "ShowWindow" because that will clash with |
| + // the Windows function which is actually a #define. |
| + virtual void ShowCreatedWindow(int process_id, |
| + int main_frame_widget_route_id, |
| + WindowOpenDisposition disposition, |
| + const gfx::Rect& initial_rect, |
| + bool user_gesture) {} |
| + |
| protected: |
| virtual ~RenderFrameHostDelegate() {} |
| }; |