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

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

Issue 2762623003: [Extensions Bindings] Add lastError utilities to APIBindingJSUtil (Closed)
Patch Set: . 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
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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 const std::string& event_name, 635 const std::string& event_name,
636 binding::EventListenersChanged change, 636 binding::EventListenersChanged change,
637 v8::Local<v8::Context> context) { 637 v8::Local<v8::Context> context) {
638 send_event_listener_ipc_.Run( 638 send_event_listener_ipc_.Run(
639 change, ScriptContextSet::GetContextByV8Context(context), event_name); 639 change, ScriptContextSet::GetContextByV8Context(context), event_name);
640 } 640 }
641 641
642 void NativeExtensionBindingsSystem::GetJSBindingUtil( 642 void NativeExtensionBindingsSystem::GetJSBindingUtil(
643 v8::Local<v8::Context> context, 643 v8::Local<v8::Context> context,
644 v8::Local<v8::Value>* binding_util_out) { 644 v8::Local<v8::Value>* binding_util_out) {
645 gin::Handle<APIBindingJSUtil> handle = 645 gin::Handle<APIBindingJSUtil> handle = gin::CreateHandle(
646 gin::CreateHandle(context->GetIsolate(), 646 context->GetIsolate(),
647 new APIBindingJSUtil(api_system_.type_reference_map(), 647 new APIBindingJSUtil(
648 api_system_.request_handler(), 648 api_system_.type_reference_map(), api_system_.request_handler(),
649 api_system_.event_handler())); 649 api_system_.event_handler(), base::Bind(&CallJsFunction)));
650 *binding_util_out = handle.ToV8(); 650 *binding_util_out = handle.ToV8();
651 } 651 }
652 652
653 } // namespace extensions 653 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698