Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/common/permissions/permissions_info.h ('k') | extensions/renderer/event_bindings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « extensions/common/permissions/permissions_info.h ('k') | extensions/renderer/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698