| 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/api_bindings_system.h" | 5 #include "extensions/renderer/bindings/api_bindings_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_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/common/event_filtering_info.h" | 13 #include "extensions/common/event_filtering_info.h" |
| 14 #include "extensions/common/extension_api.h" | 14 #include "extensions/renderer/bindings/api_binding.h" |
| 15 #include "extensions/renderer/api_binding.h" | 15 #include "extensions/renderer/bindings/api_binding_hooks.h" |
| 16 #include "extensions/renderer/api_binding_hooks.h" | 16 #include "extensions/renderer/bindings/api_binding_hooks_test_delegate.h" |
| 17 #include "extensions/renderer/api_binding_hooks_test_delegate.h" | 17 #include "extensions/renderer/bindings/api_binding_test_util.h" |
| 18 #include "extensions/renderer/api_binding_test_util.h" | 18 #include "extensions/renderer/bindings/api_binding_types.h" |
| 19 #include "extensions/renderer/api_binding_types.h" | 19 #include "extensions/renderer/bindings/api_bindings_system_unittest.h" |
| 20 #include "extensions/renderer/api_bindings_system_unittest.h" | 20 #include "extensions/renderer/bindings/api_invocation_errors.h" |
| 21 #include "extensions/renderer/api_invocation_errors.h" | |
| 22 #include "gin/arguments.h" | 21 #include "gin/arguments.h" |
| 23 #include "gin/converter.h" | 22 #include "gin/converter.h" |
| 24 #include "gin/try_catch.h" | 23 #include "gin/try_catch.h" |
| 25 | 24 |
| 26 namespace extensions { | 25 namespace extensions { |
| 27 | 26 |
| 28 namespace { | 27 namespace { |
| 29 | 28 |
| 30 // Fake API for testing. | 29 // Fake API for testing. |
| 31 const char kAlphaAPIName[] = "alpha"; | 30 const char kAlphaAPIName[] = "alpha"; |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 v8::Local<v8::Value> other_event = | 469 v8::Local<v8::Value> other_event = |
| 471 GetPropertyFromObject(api, context, "alphaOtherEvent"); | 470 GetPropertyFromObject(api, context, "alphaOtherEvent"); |
| 472 ASSERT_TRUE(other_event->IsObject()); | 471 ASSERT_TRUE(other_event->IsObject()); |
| 473 EXPECT_EQ("\"alpha.alphaOtherEvent\"", | 472 EXPECT_EQ("\"alpha.alphaOtherEvent\"", |
| 474 GetStringPropertyFromObject(other_event.As<v8::Object>(), context, | 473 GetStringPropertyFromObject(other_event.As<v8::Object>(), context, |
| 475 "name")); | 474 "name")); |
| 476 EXPECT_NE(event, other_event); | 475 EXPECT_NE(event, other_event); |
| 477 } | 476 } |
| 478 | 477 |
| 479 } // namespace extensions | 478 } // namespace extensions |
| OLD | NEW |