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

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

Issue 1158063002: Add plugins::TestPluginPlaceholder class and allow its use in Blink layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pluginfix
Patch Set: Created 5 years, 7 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/plugin_placeholder.cc
diff --git a/components/plugins/renderer/plugin_placeholder.cc b/components/plugins/renderer/plugin_placeholder.cc
index e2ec161d2651223435868029519af760d6d277c0..b7457921b60d529c9169fe3fcf3a2dff66ca976f 100644
--- a/components/plugins/renderer/plugin_placeholder.cc
+++ b/components/plugins/renderer/plugin_placeholder.cc
@@ -7,6 +7,7 @@
#include "base/strings/string_util.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
+#include "content/public/common/web_preferences.h"
#include "gin/object_template_builder.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
@@ -28,7 +29,8 @@ PluginPlaceholder::PluginPlaceholder(content::RenderFrame* render_frame,
frame_(frame),
plugin_params_(params),
plugin_(WebViewPlugin::Create(this,
- render_frame->GetWebkitPreferences(),
+ render_frame ? render_frame->GetWebkitPreferences()
+ : content::WebPreferences(),
html_data,
GURL(kPluginPlaceholderDataURL))),
hidden_(false) {

Powered by Google App Engine
This is Rietveld 408576698