mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-03 12:37:36 +01:00
84 lines
2.8 KiB
Diff
84 lines
2.8 KiB
Diff
diff --git web_contents.cc web_contents.cc
|
|
index fa0afb5..d677b31 100644
|
|
--- web_contents.cc
|
|
+++ web_contents.cc
|
|
@@ -29,7 +29,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
|
|
guest_delegate(nullptr),
|
|
context(nullptr),
|
|
renderer_initiated_creation(false),
|
|
- initialize_renderer(false) {
|
|
+ initialize_renderer(false),
|
|
+ view(nullptr),
|
|
+ delegate_view(nullptr) {
|
|
}
|
|
|
|
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
|
diff --git web_contents.h web_contents.h
|
|
index 9ccb6fe..d8561f9 100644
|
|
--- web_contents.h
|
|
+++ web_contents.h
|
|
@@ -55,8 +55,10 @@ class PageState;
|
|
class RenderFrameHost;
|
|
class RenderProcessHost;
|
|
class RenderViewHost;
|
|
+class RenderViewHostDelegateView;
|
|
class RenderWidgetHostView;
|
|
class WebContentsDelegate;
|
|
+class WebContentsView;
|
|
struct CustomContextMenuContext;
|
|
struct DropData;
|
|
struct Manifest;
|
|
@@ -157,6 +159,10 @@ class WebContents : public PageNavigator,
|
|
// Note that the pre-created renderer process may not be used if the first
|
|
// navigation requires a dedicated or privileged process, such as a WebUI.
|
|
bool initialize_renderer;
|
|
+
|
|
+ // Optionally specify the view and delegate view.
|
|
+ content::WebContentsView* view;
|
|
+ content::RenderViewHostDelegateView* delegate_view;
|
|
};
|
|
|
|
// Creates a new WebContents.
|
|
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
|
index df97348..8e2168e 100644
|
|
--- web_contents_delegate.cc
|
|
+++ web_contents_delegate.cc
|
|
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
|
const std::string& frame_name,
|
|
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;
|
|
}
|
|
|
|
diff --git web_contents_delegate.h web_contents_delegate.h
|
|
index 2816c4d..387821f 100644
|
|
--- web_contents_delegate.h
|
|
+++ web_contents_delegate.h
|
|
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;
|
|
class PageState;
|
|
class RenderFrameHost;
|
|
class RenderViewHost;
|
|
+class RenderViewHostDelegateView;
|
|
class SessionStorageNamespace;
|
|
class WebContents;
|
|
class WebContentsImpl;
|
|
+class WebContentsView;
|
|
struct ColorSuggestion;
|
|
struct ContextMenuParams;
|
|
struct DropData;
|
|
@@ -307,7 +309,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
|
const std::string& frame_name,
|
|
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.
|