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 55b0de71e3955cbbd5cea85509c3429c91213bbb..4f3178036cda45d6dee1f0b9e6f4d0bbd2672ad9 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" |
@@ -47,12 +48,17 @@ class PageState; |
class RenderFrameHost; |
class RenderFrameHostImpl; |
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 { |
@@ -225,6 +231,44 @@ class CONTENT_EXPORT RenderFrameHostDelegate { |
RenderFrameHostImpl* frame, |
const gfx::Rect& bounds_in_root_view) {} |
+ // The page is trying to open a new page (e.g. a popup window). The window |
+ // should be created associated with the given |main_frame_widget_route_id| in |
+ // the process of |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() {} |
}; |