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

Side by Side Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 1103273009: Use v8::Local inplace of v8::Handle in src/chrome/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
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 "chrome/renderer/plugins/chrome_plugin_placeholder.h" 5 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/prerender_messages.h" 10 #include "chrome/common/prerender_messages.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 params.y = event.windowY; 364 params.y = event.windowY;
365 365
366 context_menu_request_id_ = render_frame()->ShowContextMenu(this, params); 366 context_menu_request_id_ = render_frame()->ShowContextMenu(this, params);
367 g_last_active_menu = this; 367 g_last_active_menu = this;
368 #endif // OS_ANDROID 368 #endif // OS_ANDROID
369 } 369 }
370 370
371 void ChromePluginPlaceholder::BindWebFrame(blink::WebFrame* frame) { 371 void ChromePluginPlaceholder::BindWebFrame(blink::WebFrame* frame) {
372 v8::Isolate* isolate = blink::mainThreadIsolate(); 372 v8::Isolate* isolate = blink::mainThreadIsolate();
373 v8::HandleScope handle_scope(isolate); 373 v8::HandleScope handle_scope(isolate);
374 v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); 374 v8::Local<v8::Context> context = frame->mainWorldScriptContext();
375 DCHECK(!context.IsEmpty()); 375 DCHECK(!context.IsEmpty());
376 376
377 v8::Context::Scope context_scope(context); 377 v8::Context::Scope context_scope(context);
378 v8::Handle<v8::Object> global = context->Global(); 378 v8::Local<v8::Object> global = context->Global();
379 global->Set(gin::StringToV8(isolate, "plugin"), 379 global->Set(gin::StringToV8(isolate, "plugin"),
380 gin::CreateHandle(isolate, this).ToV8()); 380 gin::CreateHandle(isolate, this).ToV8());
381 } 381 }
382 382
383 gin::ObjectTemplateBuilder ChromePluginPlaceholder::GetObjectTemplateBuilder( 383 gin::ObjectTemplateBuilder ChromePluginPlaceholder::GetObjectTemplateBuilder(
384 v8::Isolate* isolate) { 384 v8::Isolate* isolate) {
385 return LoadablePluginPlaceholder::GetObjectTemplateBuilder(isolate).SetMethod( 385 return LoadablePluginPlaceholder::GetObjectTemplateBuilder(isolate).SetMethod(
386 "openAboutPlugins", &ChromePluginPlaceholder::OpenAboutPluginsCallback); 386 "openAboutPlugins", &ChromePluginPlaceholder::OpenAboutPluginsCallback);
387 } 387 }
OLDNEW
« no previous file with comments | « chrome/renderer/net_benchmarking_extension.cc ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698