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

Side by Side Diff: extensions/renderer/native_extension_bindings_system.cc

Issue 2762623003: [Extensions Bindings] Add lastError utilities to APIBindingJSUtil (Closed)
Patch Set: Rebase Created 3 years, 9 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
« no previous file with comments | « extensions/renderer/api_request_handler.h ('k') | 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 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
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
OLDNEW
« no previous file with comments | « extensions/renderer/api_request_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698