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

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

Issue 1126073003: Plugin Placeholders: Refactor for platforms that don't support plugins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The version that was reverted. 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/mobile_youtube_plugin.cc
diff --git a/components/plugins/renderer/mobile_youtube_plugin.cc b/components/plugins/renderer/mobile_youtube_plugin.cc
index 4664db7513c878a6973c6ad9c95289f068b90409..e53f5e14a67e8a45869dcada97881e807399cfe1 100644
--- a/components/plugins/renderer/mobile_youtube_plugin.cc
+++ b/components/plugins/renderer/mobile_youtube_plugin.cc
@@ -11,10 +11,8 @@
#include "base/values.h"
#include "content/public/common/content_constants.h"
#include "content/public/renderer/render_frame.h"
-#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebKit.h"
#include "ui/base/webui/jstemplate_builder.h"
using blink::WebFrame;
@@ -76,13 +74,12 @@ namespace plugins {
MobileYouTubePlugin::MobileYouTubePlugin(content::RenderFrame* render_frame,
blink::WebLocalFrame* frame,
const blink::WebPluginParams& params,
- base::StringPiece& template_html,
- GURL placeholderDataUrl)
+ base::StringPiece& template_html)
: PluginPlaceholder(render_frame,
frame,
params,
- HtmlData(params, template_html),
- placeholderDataUrl) {}
+ HtmlData(params, template_html)) {
+}
MobileYouTubePlugin::~MobileYouTubePlugin() {}
@@ -107,18 +104,6 @@ void MobileYouTubePlugin::OpenYoutubeUrlCallback() {
GetFrame(), request, blink::WebNavigationPolicyNewForegroundTab);
}
-void MobileYouTubePlugin::BindWebFrame(WebFrame* frame) {
- v8::Isolate* isolate = blink::mainThreadIsolate();
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = frame->mainWorldScriptContext();
- DCHECK(!context.IsEmpty());
-
- v8::Context::Scope context_scope(context);
- v8::Local<v8::Object> global = context->Global();
- global->Set(gin::StringToV8(isolate, "plugin"),
- gin::CreateHandle(isolate, this).ToV8());
-}
-
gin::ObjectTemplateBuilder MobileYouTubePlugin::GetObjectTemplateBuilder(
v8::Isolate* isolate) {
return PluginPlaceholder::GetObjectTemplateBuilder(isolate)
« no previous file with comments | « components/plugins/renderer/mobile_youtube_plugin.h ('k') | components/plugins/renderer/plugin_placeholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698