Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: components/plugins/renderer/webview_plugin.cc

Issue 357203003: Move webpreferences.* from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 1e8399560f09b767cfc76cfb3f69ac336a70d1ae..204f716fa94e77a0f5d14f38308059ef72651bb0 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -7,7 +7,8 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/numerics/safe_conversions.h"
-#include "content/public/renderer/web_preferences.h"
+#include "content/public/common/web_preferences.h"
+#include "content/public/renderer/render_view.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebURL.h"
@@ -19,7 +20,6 @@
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebView.h"
-#include "webkit/common/webpreferences.h"
using blink::WebCanvas;
using blink::WebCursorInfo;
@@ -40,8 +40,10 @@ using blink::WebURLRequest;
using blink::WebURLResponse;
using blink::WebVector;
using blink::WebView;
+using content::WebPreferences;
WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate,
+ content::RenderView* render_view,
const WebPreferences& preferences)
: delegate_(delegate),
container_(NULL),
@@ -50,17 +52,18 @@ WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate,
focused_(false) {
// ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
// consistent view of our preferences.
- content::ApplyWebPreferences(preferences, web_view_);
+ render_view->ApplyWebPreferences(preferences);
web_frame_ = WebLocalFrame::create(this);
web_view_->setMainFrame(web_frame_);
}
// static
WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate,
+ content::RenderView* render_view,
const WebPreferences& preferences,
const std::string& html_data,
const GURL& url) {
- WebViewPlugin* plugin = new WebViewPlugin(delegate, preferences);
+ WebViewPlugin* plugin = new WebViewPlugin(delegate, render_view, preferences);
plugin->web_view()->mainFrame()->loadHTMLString(html_data, url);
return plugin;
}

Powered by Google App Engine
This is Rietveld 408576698