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

Side by Side Diff: components/plugins/renderer/mobile_youtube_plugin.cc

Issue 693883002: v8::Handle<T> is just an alias of v8::Local<T> so, replacing v8::Handle with v8::Local in src/compo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/plugins/renderer/mobile_youtube_plugin.h" 5 #include "components/plugins/renderer/mobile_youtube_plugin.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 WebURLRequest request; 103 WebURLRequest request;
104 request.initialize(); 104 request.initialize();
105 request.setURL(url); 105 request.setURL(url);
106 render_frame()->LoadURLExternally( 106 render_frame()->LoadURLExternally(
107 GetFrame(), request, blink::WebNavigationPolicyNewForegroundTab); 107 GetFrame(), request, blink::WebNavigationPolicyNewForegroundTab);
108 } 108 }
109 109
110 void MobileYouTubePlugin::BindWebFrame(WebFrame* frame) { 110 void MobileYouTubePlugin::BindWebFrame(WebFrame* frame) {
111 v8::Isolate* isolate = blink::mainThreadIsolate(); 111 v8::Isolate* isolate = blink::mainThreadIsolate();
112 v8::HandleScope handle_scope(isolate); 112 v8::HandleScope handle_scope(isolate);
113 v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); 113 v8::Local<v8::Context> context = frame->mainWorldScriptContext();
114 DCHECK(!context.IsEmpty()); 114 DCHECK(!context.IsEmpty());
115 115
116 v8::Context::Scope context_scope(context); 116 v8::Context::Scope context_scope(context);
117 v8::Handle<v8::Object> global = context->Global(); 117 v8::Local<v8::Object> global = context->Global();
118 global->Set(gin::StringToV8(isolate, "plugin"), 118 global->Set(gin::StringToV8(isolate, "plugin"),
119 gin::CreateHandle(isolate, this).ToV8()); 119 gin::CreateHandle(isolate, this).ToV8());
120 } 120 }
121 121
122 gin::ObjectTemplateBuilder MobileYouTubePlugin::GetObjectTemplateBuilder( 122 gin::ObjectTemplateBuilder MobileYouTubePlugin::GetObjectTemplateBuilder(
123 v8::Isolate* isolate) { 123 v8::Isolate* isolate) {
124 return PluginPlaceholder::GetObjectTemplateBuilder(isolate) 124 return PluginPlaceholder::GetObjectTemplateBuilder(isolate)
125 .SetMethod("openYoutubeURL", &MobileYouTubePlugin::OpenYoutubeUrlCallback); 125 .SetMethod("openYoutubeURL", &MobileYouTubePlugin::OpenYoutubeUrlCallback);
126 } 126 }
127 127
128 } // namespace plugins 128 } // namespace plugins
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698