summaryrefslogtreecommitdiffstats
path: root/lib/web_contents_delegate_qt.h
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-08-27 16:36:03 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-09-02 12:18:24 +0200
commit7146fcc14dcd69f39f20a3e49a9b371bd306bb53 (patch)
tree708cbbe9e6fa39edcccd334b09eba9ec123224c9 /lib/web_contents_delegate_qt.h
parentb7210ab328438038bbf1c0e03f19616d6ce56c76 (diff)
Implement window creation through QWebEnginePage::createWindow.
This makes the necessary changes to handle WebContentsDelegateQt::AddNewContents and funnel the callback through createWindow in QWebEnginePage and QWebEngineView. - Expose the AddNewContents callback through WebContentsAdapterClient - Allow creating a WebContentsAdapter attached only on the Chromium side, leaving the choice to QWebEnginePage to either adopt it and call WebContentsAdapter::initialize to attach itself as the client, or destroy it if the application isn't handling the call. - Delay the InitAsChild handling in RenderWidgetHostViewQt when it is called before an adapter client has been attached. - Since WebContentsAdapterClient::CreateRenderWidgetHostViewQtDelegate is only a factory method, not creating any link with the callee client, allow using the creating window's adapter client to create the RWHVQtDelegate. This allows an unparented delegate to be created instead of needing to add numerous null-checks in RWHVQt. Use content::WebContents::CreateParams::context for this purpose, which can be used both when creating a WebContents ourselves and when a new window's WebContents is created for us. Change-Id: I032262e867931dc40a7c2eca0c993027a555f56e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'lib/web_contents_delegate_qt.h')
-rw-r--r--lib/web_contents_delegate_qt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/web_contents_delegate_qt.h b/lib/web_contents_delegate_qt.h
index 8f631855e..6568631b4 100644
--- a/lib/web_contents_delegate_qt.h
+++ b/lib/web_contents_delegate_qt.h
@@ -60,6 +60,7 @@ public:
WebContentsDelegateQt(content::WebContents*, WebContentsAdapterClient *adapterClient);
virtual void NavigationStateChanged(const content::WebContents* source, unsigned changed_flags);
+ virtual void AddNewContents(content::WebContents* source, content::WebContents* new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture, bool* was_blocked);
virtual void LoadingStateChanged(content::WebContents* source);
virtual void DidFailLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, int error_code, const string16 &error_description, content::RenderViewHost *render_view_host);
virtual void DidFinishLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, content::RenderViewHost *render_view_host);