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

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1161923004: Reland: Plugin Placeholders: Refactor for platforms that don't support plugins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge to solve patch conflicts again... 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: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index 64ee214d417e85650ed1b9f36d41e8c549012934..9dc40b50451a5b50ff034c2ab7330cd5d3ba0dc6 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -21,6 +21,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "components/plugins/renderer/plugin_placeholder.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
@@ -36,7 +37,6 @@
#include "content/shell/renderer/layout_test/gc_controller.h"
#include "content/shell/renderer/layout_test/layout_test_render_process_observer.h"
#include "content/shell/renderer/layout_test/leak_detector.h"
-#include "content/shell/renderer/layout_test/test_plugin_placeholder.h"
#include "content/shell/renderer/test_runner/app_banner_client.h"
#include "content/shell/renderer/test_runner/gamepad_controller.h"
#include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
@@ -683,9 +683,12 @@ void BlinkTestRunner::ResolveBeforeInstallPromptPromise(
blink::WebPlugin* BlinkTestRunner::CreatePluginPlaceholder(
blink::WebLocalFrame* frame, const blink::WebPluginParams& params) {
- if (params.mimeType == "application/x-plugin-placeholder-test")
- return (new TestPluginPlaceholder(frame, params))->plugin();
- return 0;
+ if (params.mimeType != "application/x-plugin-placeholder-test")
+ return nullptr;
+
+ plugins::PluginPlaceholder* placeholder = new plugins::PluginPlaceholder(
+ nullptr, frame, params, "<div>Test content</div>");
+ return placeholder->plugin();
}
// RenderViewObserver --------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698