| 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/argument_spec.h" | 5 #include "extensions/renderer/bindings/argument_spec.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "content/public/child/v8_value_converter.h" | 12 #include "content/public/child/v8_value_converter.h" |
| 13 #include "extensions/renderer/api_invocation_errors.h" | 13 #include "extensions/renderer/bindings/api_invocation_errors.h" |
| 14 #include "extensions/renderer/api_type_reference_map.h" | 14 #include "extensions/renderer/bindings/api_type_reference_map.h" |
| 15 #include "gin/converter.h" | 15 #include "gin/converter.h" |
| 16 #include "gin/dictionary.h" | 16 #include "gin/dictionary.h" |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Returns a type string for the given |value|. | 22 // Returns a type string for the given |value|. |
| 23 const char* GetV8ValueTypeString(v8::Local<v8::Value> value) { | 23 const char* GetV8ValueTypeString(v8::Local<v8::Value> value) { |
| 24 DCHECK(!value.IsEmpty()); | 24 DCHECK(!value.IsEmpty()); |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 return true; | 634 return true; |
| 635 } | 635 } |
| 636 | 636 |
| 637 std::string ArgumentSpec::GetInvalidTypeError( | 637 std::string ArgumentSpec::GetInvalidTypeError( |
| 638 v8::Local<v8::Value> value) const { | 638 v8::Local<v8::Value> value) const { |
| 639 return api_errors::InvalidType(GetTypeName().c_str(), | 639 return api_errors::InvalidType(GetTypeName().c_str(), |
| 640 GetV8ValueTypeString(value)); | 640 GetV8ValueTypeString(value)); |
| 641 } | 641 } |
| 642 | 642 |
| 643 } // namespace extensions | 643 } // namespace extensions |
| OLD | NEW |