| OLD | NEW | 
|---|
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|