OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/module_system.h" | 5 #include "extensions/renderer/module_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
14 #include "content/public/renderer/render_frame.h" | 14 #include "content/public/renderer/render_frame.h" |
15 #include "content/public/renderer/render_view.h" | 15 #include "content/public/renderer/render_view.h" |
16 #include "extensions/common/extension.h" | 16 #include "extensions/common/extension.h" |
17 #include "extensions/common/extensions_client.h" | 17 #include "extensions/common/extensions_client.h" |
18 #include "extensions/renderer/console.h" | 18 #include "extensions/renderer/console.h" |
19 #include "extensions/renderer/safe_builtins.h" | 19 #include "extensions/renderer/safe_builtins.h" |
20 #include "extensions/renderer/script_context.h" | 20 #include "extensions/renderer/script_context.h" |
21 #include "extensions/renderer/script_context_set.h" | 21 #include "extensions/renderer/script_context_set.h" |
22 #include "extensions/renderer/v8_helpers.h" | 22 #include "extensions/renderer/v8_helpers.h" |
23 #include "gin/modules/module_registry.h" | 23 #include "gin/modules/module_registry.h" |
24 #include "third_party/WebKit/public/web/WebFrame.h" | 24 #include "third_party/WebKit/public/web/WebFrame.h" |
25 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" | |
26 | 25 |
27 namespace extensions { | 26 namespace extensions { |
28 | 27 |
29 using namespace v8_helpers; | 28 using namespace v8_helpers; |
30 | 29 |
31 namespace { | 30 namespace { |
32 | 31 |
33 const char* kModuleSystem = "module_system"; | 32 const char* kModuleSystem = "module_system"; |
34 const char* kModuleName = "module_name"; | 33 const char* kModuleName = "module_name"; |
35 const char* kModuleField = "module_field"; | 34 const char* kModuleField = "module_field"; |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 744 |
746 void ModuleSystem::ClobberExistingNativeHandler(const std::string& name) { | 745 void ModuleSystem::ClobberExistingNativeHandler(const std::string& name) { |
747 NativeHandlerMap::iterator existing_handler = native_handler_map_.find(name); | 746 NativeHandlerMap::iterator existing_handler = native_handler_map_.find(name); |
748 if (existing_handler != native_handler_map_.end()) { | 747 if (existing_handler != native_handler_map_.end()) { |
749 clobbered_native_handlers_.push_back(std::move(existing_handler->second)); | 748 clobbered_native_handlers_.push_back(std::move(existing_handler->second)); |
750 native_handler_map_.erase(existing_handler); | 749 native_handler_map_.erase(existing_handler); |
751 } | 750 } |
752 } | 751 } |
753 | 752 |
754 } // namespace extensions | 753 } // namespace extensions |
OLD | NEW |