| 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/js_extension_bindings_system.h" | 5 #include "extensions/renderer/js_extension_bindings_system.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
| 9 #include "content/public/child/v8_value_converter.h" | 9 #include "content/public/child/v8_value_converter.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 request_sender_->HandleResponse(request_id, success, response, error); | 241 request_sender_->HandleResponse(request_id, success, response, error); |
| 242 } | 242 } |
| 243 | 243 |
| 244 RequestSender* JsExtensionBindingsSystem::GetRequestSender() { | 244 RequestSender* JsExtensionBindingsSystem::GetRequestSender() { |
| 245 return request_sender_.get(); | 245 return request_sender_.get(); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void JsExtensionBindingsSystem::DispatchEventInContext( | 248 void JsExtensionBindingsSystem::DispatchEventInContext( |
| 249 const std::string& event_name, | 249 const std::string& event_name, |
| 250 const base::ListValue* event_args, | 250 const base::ListValue* event_args, |
| 251 const base::DictionaryValue* filtering_info, | 251 const EventFilteringInfo* filtering_info, |
| 252 ScriptContext* context) { | 252 ScriptContext* context) { |
| 253 EventBindings::DispatchEventInContext(event_name, event_args, filtering_info, | 253 EventBindings::DispatchEventInContext(event_name, event_args, filtering_info, |
| 254 context); | 254 context); |
| 255 } | 255 } |
| 256 | 256 |
| 257 bool JsExtensionBindingsSystem::HasEventListenerInContext( | 257 bool JsExtensionBindingsSystem::HasEventListenerInContext( |
| 258 const std::string& event_name, | 258 const std::string& event_name, |
| 259 ScriptContext* context) { | 259 ScriptContext* context) { |
| 260 return EventBindings::HasListener(context, event_name); | 260 return EventBindings::HasListener(context, event_name); |
| 261 } | 261 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 std::unique_ptr<NativeHandler>( | 298 std::unique_ptr<NativeHandler>( |
| 299 new BindingGeneratingNativeHandler(context, api_name, "binding"))); | 299 new BindingGeneratingNativeHandler(context, api_name, "binding"))); |
| 300 module_system->SetNativeLazyField(bind_object, bind_name, api_bind_name, | 300 module_system->SetNativeLazyField(bind_object, bind_name, api_bind_name, |
| 301 "binding"); | 301 "binding"); |
| 302 } else { | 302 } else { |
| 303 module_system->SetLazyField(bind_object, bind_name, api_name, "binding"); | 303 module_system->SetLazyField(bind_object, bind_name, api_name, "binding"); |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace extensions | 307 } // namespace extensions |
| OLD | NEW |