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" |
25 | 26 |
26 namespace extensions { | 27 namespace extensions { |
27 | 28 |
28 using namespace v8_helpers; | 29 using namespace v8_helpers; |
29 | 30 |
30 namespace { | 31 namespace { |
31 | 32 |
32 const char* kModuleSystem = "module_system"; | 33 const char* kModuleSystem = "module_system"; |
33 const char* kModuleName = "module_name"; | 34 const char* kModuleName = "module_name"; |
34 const char* kModuleField = "module_field"; | 35 const char* kModuleField = "module_field"; |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 745 |
745 void ModuleSystem::ClobberExistingNativeHandler(const std::string& name) { | 746 void ModuleSystem::ClobberExistingNativeHandler(const std::string& name) { |
746 NativeHandlerMap::iterator existing_handler = native_handler_map_.find(name); | 747 NativeHandlerMap::iterator existing_handler = native_handler_map_.find(name); |
747 if (existing_handler != native_handler_map_.end()) { | 748 if (existing_handler != native_handler_map_.end()) { |
748 clobbered_native_handlers_.push_back(std::move(existing_handler->second)); | 749 clobbered_native_handlers_.push_back(std::move(existing_handler->second)); |
749 native_handler_map_.erase(existing_handler); | 750 native_handler_map_.erase(existing_handler); |
750 } | 751 } |
751 } | 752 } |
752 | 753 |
753 } // namespace extensions | 754 } // namespace extensions |
OLD | NEW |