| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 if (changed == binding::EventListenersChanged::HAS_LISTENERS) { | 210 if (changed == binding::EventListenersChanged::HAS_LISTENERS) { |
| 211 content::RenderThread::Get()->Send(new ExtensionHostMsg_AddListener( | 211 content::RenderThread::Get()->Send(new ExtensionHostMsg_AddListener( |
| 212 context->GetExtensionID(), context->url(), event_name)); | 212 context->GetExtensionID(), context->url(), event_name)); |
| 213 } else { | 213 } else { |
| 214 DCHECK_EQ(binding::EventListenersChanged::NO_LISTENERS, changed); | 214 DCHECK_EQ(binding::EventListenersChanged::NO_LISTENERS, changed); |
| 215 content::RenderThread::Get()->Send(new ExtensionHostMsg_RemoveListener( | 215 content::RenderThread::Get()->Send(new ExtensionHostMsg_RemoveListener( |
| 216 context->GetExtensionID(), context->url(), event_name)); | 216 context->GetExtensionID(), context->url(), event_name)); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 base::LazyInstance<WorkerScriptContextSet> g_worker_script_context_set = | 220 base::LazyInstance<WorkerScriptContextSet>::DestructorAtExit |
| 221 LAZY_INSTANCE_INITIALIZER; | 221 g_worker_script_context_set = LAZY_INSTANCE_INITIALIZER; |
| 222 | 222 |
| 223 } // namespace | 223 } // namespace |
| 224 | 224 |
| 225 // Note that we can't use Blink public APIs in the constructor becase Blink | 225 // Note that we can't use Blink public APIs in the constructor becase Blink |
| 226 // is not initialized at the point we create Dispatcher. | 226 // is not initialized at the point we create Dispatcher. |
| 227 Dispatcher::Dispatcher(DispatcherDelegate* delegate) | 227 Dispatcher::Dispatcher(DispatcherDelegate* delegate) |
| 228 : delegate_(delegate), | 228 : delegate_(delegate), |
| 229 content_watcher_(new ContentWatcher()), | 229 content_watcher_(new ContentWatcher()), |
| 230 source_map_(&ResourceBundle::GetSharedInstance()), | 230 source_map_(&ResourceBundle::GetSharedInstance()), |
| 231 v8_schema_registry_(new V8SchemaRegistry), | 231 v8_schema_registry_(new V8SchemaRegistry), |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 // The "guestViewDeny" module must always be loaded last. It registers | 1408 // The "guestViewDeny" module must always be loaded last. It registers |
| 1409 // error-providing custom elements for the GuestView types that are not | 1409 // error-providing custom elements for the GuestView types that are not |
| 1410 // available, and thus all of those types must have been checked and loaded | 1410 // available, and thus all of those types must have been checked and loaded |
| 1411 // (or not loaded) beforehand. | 1411 // (or not loaded) beforehand. |
| 1412 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 1412 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
| 1413 module_system->Require("guestViewDeny"); | 1413 module_system->Require("guestViewDeny"); |
| 1414 } | 1414 } |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 } // namespace extensions | 1417 } // namespace extensions |
| OLD | NEW |