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/dispatcher.h" | 5 #include "extensions/renderer/dispatcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 if (set_idle_notifications_) { | 219 if (set_idle_notifications_) { |
220 RenderThread::Get()->SetIdleNotificationDelayInMs( | 220 RenderThread::Get()->SetIdleNotificationDelayInMs( |
221 kInitialExtensionIdleHandlerDelayMs); | 221 kInitialExtensionIdleHandlerDelayMs); |
222 } | 222 } |
223 | 223 |
224 script_context_set_.reset(new ScriptContextSet(&active_extension_ids_)); | 224 script_context_set_.reset(new ScriptContextSet(&active_extension_ids_)); |
225 user_script_set_manager_.reset(new UserScriptSetManager()); | 225 user_script_set_manager_.reset(new UserScriptSetManager()); |
226 script_injection_manager_.reset( | 226 script_injection_manager_.reset( |
227 new ScriptInjectionManager(user_script_set_manager_.get())); | 227 new ScriptInjectionManager(user_script_set_manager_.get())); |
228 user_script_set_manager_observer_.Add(user_script_set_manager_.get()); | 228 user_script_set_manager_observer_.Add(user_script_set_manager_.get()); |
229 request_sender_.reset(new RequestSender(this)); | 229 request_sender_.reset(new RequestSender()); |
230 PopulateSourceMap(); | 230 PopulateSourceMap(); |
231 WakeEventPage::Get()->Init(RenderThread::Get()); | 231 WakeEventPage::Get()->Init(RenderThread::Get()); |
232 | 232 |
233 RenderThread::Get()->RegisterExtension(SafeBuiltins::CreateV8Extension()); | 233 RenderThread::Get()->RegisterExtension(SafeBuiltins::CreateV8Extension()); |
234 | 234 |
235 // WebSecurityPolicy whitelists. They should be registered for both | 235 // WebSecurityPolicy whitelists. They should be registered for both |
236 // chrome-extension: and chrome-extension-resource. | 236 // chrome-extension: and chrome-extension-resource. |
237 using RegisterFunction = void (*)(const WebString&); | 237 using RegisterFunction = void (*)(const WebString&); |
238 RegisterFunction register_functions[] = { | 238 RegisterFunction register_functions[] = { |
239 // Treat as secure because communication with them is entirely in the | 239 // Treat as secure because communication with them is entirely in the |
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 // The "guestViewDeny" module must always be loaded last. It registers | 1602 // The "guestViewDeny" module must always be loaded last. It registers |
1603 // error-providing custom elements for the GuestView types that are not | 1603 // error-providing custom elements for the GuestView types that are not |
1604 // available, and thus all of those types must have been checked and loaded | 1604 // available, and thus all of those types must have been checked and loaded |
1605 // (or not loaded) beforehand. | 1605 // (or not loaded) beforehand. |
1606 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 1606 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
1607 module_system->Require("guestViewDeny"); | 1607 module_system->Require("guestViewDeny"); |
1608 } | 1608 } |
1609 } | 1609 } |
1610 | 1610 |
1611 } // namespace extensions | 1611 } // namespace extensions |
OLD | NEW |