| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "extensions/renderer/native_extension_bindings_system.h" | 5 #include "extensions/renderer/native_extension_bindings_system.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 const base::DictionaryValue* filter, | 640 const base::DictionaryValue* filter, |
| 641 v8::Local<v8::Context> context) { | 641 v8::Local<v8::Context> context) { |
| 642 send_event_listener_ipc_.Run(change, | 642 send_event_listener_ipc_.Run(change, |
| 643 ScriptContextSet::GetContextByV8Context(context), | 643 ScriptContextSet::GetContextByV8Context(context), |
| 644 event_name, filter); | 644 event_name, filter); |
| 645 } | 645 } |
| 646 | 646 |
| 647 void NativeExtensionBindingsSystem::GetJSBindingUtil( | 647 void NativeExtensionBindingsSystem::GetJSBindingUtil( |
| 648 v8::Local<v8::Context> context, | 648 v8::Local<v8::Context> context, |
| 649 v8::Local<v8::Value>* binding_util_out) { | 649 v8::Local<v8::Value>* binding_util_out) { |
| 650 gin::Handle<APIBindingJSUtil> handle = | 650 gin::Handle<APIBindingJSUtil> handle = gin::CreateHandle( |
| 651 gin::CreateHandle(context->GetIsolate(), | 651 context->GetIsolate(), |
| 652 new APIBindingJSUtil(api_system_.type_reference_map(), | 652 new APIBindingJSUtil( |
| 653 api_system_.request_handler(), | 653 api_system_.type_reference_map(), api_system_.request_handler(), |
| 654 api_system_.event_handler())); | 654 api_system_.event_handler(), base::Bind(&CallJsFunction))); |
| 655 *binding_util_out = handle.ToV8(); | 655 *binding_util_out = handle.ToV8(); |
| 656 } | 656 } |
| 657 | 657 |
| 658 } // namespace extensions | 658 } // namespace extensions |
| OLD | NEW |