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

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

Issue 2973903002: [Extensions Bindings] Introduce a supportsLazyListeners property (Closed)
Patch Set: . Created 3 years, 5 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/console_message_level.h" 9 #include "content/public/common/console_message_level.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 params.worker_thread_id = -1; 683 params.worker_thread_id = -1;
684 params.service_worker_version_id = kInvalidServiceWorkerVersionId; 684 params.service_worker_version_id = kInvalidServiceWorkerVersionId;
685 685
686 send_request_ipc_.Run(script_context, params, request->thread); 686 send_request_ipc_.Run(script_context, params, request->thread);
687 } 687 }
688 688
689 void NativeExtensionBindingsSystem::OnEventListenerChanged( 689 void NativeExtensionBindingsSystem::OnEventListenerChanged(
690 const std::string& event_name, 690 const std::string& event_name,
691 binding::EventListenersChanged change, 691 binding::EventListenersChanged change,
692 const base::DictionaryValue* filter, 692 const base::DictionaryValue* filter,
693 bool was_manual, 693 bool update_lazy_listeners,
694 v8::Local<v8::Context> context) { 694 v8::Local<v8::Context> context) {
695 send_event_listener_ipc_.Run(change, 695 send_event_listener_ipc_.Run(change,
696 ScriptContextSet::GetContextByV8Context(context), 696 ScriptContextSet::GetContextByV8Context(context),
697 event_name, filter, was_manual); 697 event_name, filter, update_lazy_listeners);
698 } 698 }
699 699
700 void NativeExtensionBindingsSystem::GetJSBindingUtil( 700 void NativeExtensionBindingsSystem::GetJSBindingUtil(
701 v8::Local<v8::Context> context, 701 v8::Local<v8::Context> context,
702 v8::Local<v8::Value>* binding_util_out) { 702 v8::Local<v8::Value>* binding_util_out) {
703 gin::Handle<APIBindingJSUtil> handle = gin::CreateHandle( 703 gin::Handle<APIBindingJSUtil> handle = gin::CreateHandle(
704 context->GetIsolate(), 704 context->GetIsolate(),
705 new APIBindingJSUtil( 705 new APIBindingJSUtil(
706 api_system_.type_reference_map(), api_system_.request_handler(), 706 api_system_.type_reference_map(), api_system_.request_handler(),
707 api_system_.event_handler(), base::Bind(&CallJsFunction))); 707 api_system_.event_handler(), base::Bind(&CallJsFunction)));
708 *binding_util_out = handle.ToV8(); 708 *binding_util_out = handle.ToV8();
709 } 709 }
710 710
711 } // namespace extensions 711 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698