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

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: remove some enable_plugins that are no longer needed Created 5 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
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/renderer/layout_test/test_plugin_placeholder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 009f47581edc800d7cc85e50172e8b06f1e4bcaf..ebba1156ae0383f3dde3da1a26788584a4c5b199 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -23,6 +23,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "components/plugins/renderer/plugin_placeholder.h"
#include "components/test_runner/app_banner_client.h"
#include "components/test_runner/gamepad_controller.h"
#include "components/test_runner/mock_screen_orientation_client.h"
@@ -46,7 +47,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 "net/base/filename_util.h"
#include "net/base/net_errors.h"
#include "skia/ext/platform_canvas.h"
@@ -688,10 +688,13 @@ 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(render_view()->GetMainRenderFrame(),
- frame, params))->plugin();
- return 0;
+ if (params.mimeType != "application/x-plugin-placeholder-test")
+ return nullptr;
+
+ plugins::PluginPlaceholder* placeholder =
+ new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame,
+ params, "<div>Test content</div>");
+ return placeholder->plugin();
}
// RenderViewObserver --------------------------------------------------------
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/renderer/layout_test/test_plugin_placeholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698