2014-09-04 17:53:40 +00:00
|
|
|
diff --git web_contents.cc web_contents.cc
|
2016-03-15 22:55:59 -04:00
|
|
|
index d4b5fd0..b804902 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- web_contents.cc
|
|
|
|
+++ web_contents.cc
|
2015-11-10 15:18:16 -05:00
|
|
|
@@ -26,7 +26,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
|
2014-06-30 22:30:29 +00:00
|
|
|
initially_hidden(false),
|
2015-02-04 18:10:14 +00:00
|
|
|
guest_delegate(nullptr),
|
2015-03-04 01:00:13 +00:00
|
|
|
context(nullptr),
|
|
|
|
- renderer_initiated_creation(false) {}
|
|
|
|
+ renderer_initiated_creation(false),
|
2015-02-04 18:10:14 +00:00
|
|
|
+ view(nullptr),
|
|
|
|
+ delegate_view(nullptr) {}
|
2014-06-30 22:30:29 +00:00
|
|
|
|
2016-03-15 22:55:59 -04:00
|
|
|
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
|
|
|
|
2014-09-04 17:53:40 +00:00
|
|
|
diff --git web_contents.h web_contents.h
|
2016-03-15 22:55:59 -04:00
|
|
|
index 9dd14bf..7c7b7c9 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- web_contents.h
|
|
|
|
+++ web_contents.h
|
2016-01-06 14:20:54 -05:00
|
|
|
@@ -54,9 +54,11 @@ class PageState;
|
2014-06-30 22:30:29 +00:00
|
|
|
class RenderFrameHost;
|
|
|
|
class RenderProcessHost;
|
|
|
|
class RenderViewHost;
|
|
|
|
+class RenderViewHostDelegateView;
|
|
|
|
class RenderWidgetHostView;
|
|
|
|
class SiteInstance;
|
|
|
|
class WebContentsDelegate;
|
|
|
|
+class WebContentsView;
|
|
|
|
struct CustomContextMenuContext;
|
|
|
|
struct DropData;
|
2014-09-26 23:48:19 +00:00
|
|
|
struct Manifest;
|
2016-03-15 22:55:59 -04:00
|
|
|
@@ -147,6 +149,10 @@ class WebContents : public PageNavigator,
|
2015-03-04 01:00:13 +00:00
|
|
|
// RenderFrame, have already been created on the renderer side, and
|
|
|
|
// WebContents construction should take this into account.
|
|
|
|
bool renderer_initiated_creation;
|
|
|
|
+
|
2014-06-30 22:30:29 +00:00
|
|
|
+ // Optionally specify the view and delegate view.
|
|
|
|
+ content::WebContentsView* view;
|
|
|
|
+ content::RenderViewHostDelegateView* delegate_view;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Creates a new WebContents.
|
2014-09-04 17:53:40 +00:00
|
|
|
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
2016-03-15 22:55:59 -04:00
|
|
|
index c937d66..4ce571f 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- web_contents_delegate.cc
|
|
|
|
+++ web_contents_delegate.cc
|
2016-02-02 16:32:44 -05:00
|
|
|
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
2015-07-23 20:06:56 -04:00
|
|
|
const std::string& frame_name,
|
2014-06-30 22:30:29 +00:00
|
|
|
const GURL& target_url,
|
|
|
|
const std::string& partition_id,
|
|
|
|
- SessionStorageNamespace* session_storage_namespace) {
|
|
|
|
+ SessionStorageNamespace* session_storage_namespace,
|
|
|
|
+ content::WebContentsView** view,
|
|
|
|
+ content::RenderViewHostDelegateView** delegate_view) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-09-04 17:53:40 +00:00
|
|
|
diff --git web_contents_delegate.h web_contents_delegate.h
|
2016-03-15 22:55:59 -04:00
|
|
|
index 2c2ac76..8f87caf 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- web_contents_delegate.h
|
|
|
|
+++ web_contents_delegate.h
|
2016-03-15 22:55:59 -04:00
|
|
|
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;
|
2014-06-30 22:30:29 +00:00
|
|
|
class PageState;
|
2016-03-15 22:55:59 -04:00
|
|
|
class RenderFrameHost;
|
2014-06-30 22:30:29 +00:00
|
|
|
class RenderViewHost;
|
|
|
|
+class RenderViewHostDelegateView;
|
|
|
|
class SessionStorageNamespace;
|
|
|
|
class WebContents;
|
|
|
|
class WebContentsImpl;
|
|
|
|
+class WebContentsView;
|
|
|
|
struct ColorSuggestion;
|
|
|
|
struct ContextMenuParams;
|
|
|
|
struct DropData;
|
2016-03-15 22:55:59 -04:00
|
|
|
@@ -311,7 +313,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
2015-07-23 20:06:56 -04:00
|
|
|
const std::string& frame_name,
|
2014-06-30 22:30:29 +00:00
|
|
|
const GURL& target_url,
|
|
|
|
const std::string& partition_id,
|
|
|
|
- SessionStorageNamespace* session_storage_namespace);
|
|
|
|
+ SessionStorageNamespace* session_storage_namespace,
|
|
|
|
+ content::WebContentsView** view,
|
|
|
|
+ content::RenderViewHostDelegateView** delegate_view);
|
|
|
|
|
|
|
|
// Notifies the delegate about the creation of a new WebContents. This
|
|
|
|
// typically happens when popups are created.
|