| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/declarative_event.h" | 5 #include "extensions/renderer/bindings/declarative_event.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "extensions/renderer/api_event_listeners.h" | 13 #include "extensions/renderer/bindings/api_event_listeners.h" |
| 14 #include "extensions/renderer/api_request_handler.h" | 14 #include "extensions/renderer/bindings/api_request_handler.h" |
| 15 #include "extensions/renderer/api_signature.h" | 15 #include "extensions/renderer/bindings/api_signature.h" |
| 16 #include "extensions/renderer/api_type_reference_map.h" | 16 #include "extensions/renderer/bindings/api_type_reference_map.h" |
| 17 #include "extensions/renderer/argument_spec.h" | 17 #include "extensions/renderer/bindings/argument_spec.h" |
| 18 #include "gin/object_template_builder.h" | 18 #include "gin/object_template_builder.h" |
| 19 #include "gin/per_context_data.h" | 19 #include "gin/per_context_data.h" |
| 20 | 20 |
| 21 namespace extensions { | 21 namespace extensions { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Builds an ArgumentSpec that accepts the given |choices| as references. | 25 // Builds an ArgumentSpec that accepts the given |choices| as references. |
| 26 std::unique_ptr<ArgumentSpec> BuildChoicesSpec( | 26 std::unique_ptr<ArgumentSpec> BuildChoicesSpec( |
| 27 const std::vector<std::string>& choices_list) { | 27 const std::vector<std::string>& choices_list) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 arguments->ThrowTypeError("Invalid invocation"); | 197 arguments->ThrowTypeError("Invalid invocation"); |
| 198 return; | 198 return; |
| 199 } | 199 } |
| 200 | 200 |
| 201 request_handler_->StartRequest( | 201 request_handler_->StartRequest( |
| 202 context, request_name, std::move(converted_arguments), callback, | 202 context, request_name, std::move(converted_arguments), callback, |
| 203 v8::Local<v8::Function>(), binding::RequestThread::UI); | 203 v8::Local<v8::Function>(), binding::RequestThread::UI); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace extensions | 206 } // namespace extensions |
| OLD | NEW |