2014-07-01 00:30:29 +02:00
|
|
|
Index: content_browser_client.cc
|
|
|
|
===================================================================
|
2014-07-02 20:25:22 +02:00
|
|
|
--- content_browser_client.cc (revision 280796)
|
2014-07-01 00:30:29 +02:00
|
|
|
+++ content_browser_client.cc (working copy)
|
2014-07-02 20:25:22 +02:00
|
|
|
@@ -280,6 +280,10 @@
|
2014-07-01 00:30:29 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
+SkColor ContentBrowserClient::GetBaseBackgroundColor(RenderViewHost* rvh) {
|
|
|
|
+ return SK_ColorWHITE;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
base::FilePath ContentBrowserClient::GetDefaultDownloadDirectory() {
|
|
|
|
return base::FilePath();
|
|
|
|
}
|
|
|
|
Index: content_browser_client.h
|
|
|
|
===================================================================
|
2014-07-02 20:25:22 +02:00
|
|
|
--- content_browser_client.h (revision 280796)
|
2014-07-01 00:30:29 +02:00
|
|
|
+++ content_browser_client.h (working copy)
|
|
|
|
@@ -23,6 +23,7 @@
|
|
|
|
#include "net/cookies/canonical_cookie.h"
|
|
|
|
#include "net/url_request/url_request_interceptor.h"
|
|
|
|
#include "net/url_request/url_request_job_factory.h"
|
|
|
|
+#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#include "third_party/WebKit/public/web/WebNotificationPresenter.h"
|
|
|
|
#include "ui/base/window_open_disposition.h"
|
|
|
|
#include "webkit/browser/fileapi/file_system_context.h"
|
2014-07-02 20:25:22 +02:00
|
|
|
@@ -538,6 +539,9 @@
|
2014-07-01 00:30:29 +02:00
|
|
|
// Clears browser cookies.
|
|
|
|
virtual void ClearCookies(RenderViewHost* rvh) {}
|
|
|
|
|
|
|
|
+ // Returns the base background color.
|
|
|
|
+ virtual SkColor GetBaseBackgroundColor(RenderViewHost* rvh);
|
|
|
|
+
|
|
|
|
// Returns the default download directory.
|
|
|
|
// This can be called on any thread.
|
|
|
|
virtual base::FilePath GetDefaultDownloadDirectory();
|
|
|
|
Index: web_contents.cc
|
|
|
|
===================================================================
|
2014-07-02 20:25:22 +02:00
|
|
|
--- web_contents.cc (revision 280796)
|
2014-07-01 00:30:29 +02:00
|
|
|
+++ web_contents.cc (working copy)
|
|
|
|
@@ -17,7 +17,9 @@
|
|
|
|
main_frame_routing_id(MSG_ROUTING_NONE),
|
|
|
|
initially_hidden(false),
|
2014-07-02 20:25:22 +02:00
|
|
|
guest_delegate(NULL),
|
2014-07-01 00:30:29 +02:00
|
|
|
- context(NULL) {}
|
|
|
|
+ context(NULL),
|
|
|
|
+ view(NULL),
|
|
|
|
+ delegate_view(NULL) {}
|
|
|
|
|
|
|
|
WebContents::CreateParams::CreateParams(
|
|
|
|
BrowserContext* context, SiteInstance* site)
|
|
|
|
@@ -29,7 +31,9 @@
|
|
|
|
main_frame_routing_id(MSG_ROUTING_NONE),
|
|
|
|
initially_hidden(false),
|
2014-07-02 20:25:22 +02:00
|
|
|
guest_delegate(NULL),
|
2014-07-01 00:30:29 +02:00
|
|
|
- context(NULL) {}
|
|
|
|
+ context(NULL),
|
|
|
|
+ view(NULL),
|
|
|
|
+ delegate_view(NULL) {}
|
|
|
|
|
|
|
|
WebContents::CreateParams::~CreateParams() {
|
|
|
|
}
|
|
|
|
Index: web_contents.h
|
|
|
|
===================================================================
|
2014-07-02 20:25:22 +02:00
|
|
|
--- web_contents.h (revision 280796)
|
2014-07-01 00:30:29 +02:00
|
|
|
+++ web_contents.h (working copy)
|
2014-07-02 20:25:22 +02:00
|
|
|
@@ -51,9 +51,11 @@
|
2014-07-01 00:30:29 +02:00
|
|
|
class RenderFrameHost;
|
|
|
|
class RenderProcessHost;
|
|
|
|
class RenderViewHost;
|
|
|
|
+class RenderViewHostDelegateView;
|
|
|
|
class RenderWidgetHostView;
|
|
|
|
class SiteInstance;
|
|
|
|
class WebContentsDelegate;
|
|
|
|
+class WebContentsView;
|
|
|
|
struct CustomContextMenuContext;
|
|
|
|
struct DropData;
|
|
|
|
struct RendererPreferences;
|
2014-07-02 20:25:22 +02:00
|
|
|
@@ -116,6 +118,10 @@
|
2014-07-01 00:30:29 +02:00
|
|
|
// Used to specify the location context which display the new view should
|
|
|
|
// belong. This can be NULL if not needed.
|
|
|
|
gfx::NativeView context;
|
|
|
|
+
|
|
|
|
+ // Optionally specify the view and delegate view.
|
|
|
|
+ content::WebContentsView* view;
|
|
|
|
+ content::RenderViewHostDelegateView* delegate_view;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Creates a new WebContents.
|
|
|
|
Index: web_contents_delegate.cc
|
|
|
|
===================================================================
|
2014-07-02 20:25:22 +02:00
|
|
|
--- web_contents_delegate.cc (revision 280796)
|
2014-07-01 00:30:29 +02:00
|
|
|
+++ web_contents_delegate.cc (working copy)
|
|
|
|
@@ -136,7 +136,9 @@
|
|
|
|
const base::string16& 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
Index: web_contents_delegate.h
|
|
|
|
===================================================================
|
2014-07-02 20:25:22 +02:00
|
|
|
--- web_contents_delegate.h (revision 280796)
|
2014-07-01 00:30:29 +02:00
|
|
|
+++ web_contents_delegate.h (working copy)
|
|
|
|
@@ -36,9 +36,11 @@
|
|
|
|
class JavaScriptDialogManager;
|
|
|
|
class PageState;
|
|
|
|
class RenderViewHost;
|
|
|
|
+class RenderViewHostDelegateView;
|
|
|
|
class SessionStorageNamespace;
|
|
|
|
class WebContents;
|
|
|
|
class WebContentsImpl;
|
|
|
|
+class WebContentsView;
|
|
|
|
struct ColorSuggestion;
|
|
|
|
struct ContextMenuParams;
|
|
|
|
struct DropData;
|
|
|
|
@@ -312,7 +314,9 @@
|
|
|
|
const base::string16& 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.
|