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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.cpp

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "modules/mediasource/MediaSourceRegistry.h" 31 #include "modules/mediasource/MediaSourceRegistry.h"
32 32
33 #include "modules/mediasource/MediaSource.h" 33 #include "modules/mediasource/MediaSource.h"
34 #include "platform/weborigin/KURL.h" 34 #include "platform/weborigin/KURL.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 MediaSourceRegistry& MediaSourceRegistry::registry() { 38 MediaSourceRegistry& MediaSourceRegistry::registry() {
39 DCHECK(isMainThread()); 39 DCHECK(isMainThread());
40 ALLOW_UNSAFE_SINGLETON()
40 DEFINE_STATIC_LOCAL(MediaSourceRegistry, instance, ()); 41 DEFINE_STATIC_LOCAL(MediaSourceRegistry, instance, ());
41 return instance; 42 return instance;
42 } 43 }
43 44
44 void MediaSourceRegistry::registerURL(SecurityOrigin*, 45 void MediaSourceRegistry::registerURL(SecurityOrigin*,
45 const KURL& url, 46 const KURL& url,
46 URLRegistrable* registrable) { 47 URLRegistrable* registrable) {
47 DCHECK_EQ(&registrable->registry(), this); 48 DCHECK_EQ(&registrable->registry(), this);
48 DCHECK(isMainThread()); 49 DCHECK(isMainThread());
49 50
(...skipping 17 matching lines...) Expand all
67 URLRegistrable* MediaSourceRegistry::lookup(const String& url) { 68 URLRegistrable* MediaSourceRegistry::lookup(const String& url) {
68 DCHECK(isMainThread()); 69 DCHECK(isMainThread());
69 return url.isNull() ? nullptr : m_mediaSources.get(url); 70 return url.isNull() ? nullptr : m_mediaSources.get(url);
70 } 71 }
71 72
72 MediaSourceRegistry::MediaSourceRegistry() { 73 MediaSourceRegistry::MediaSourceRegistry() {
73 HTMLMediaSource::setRegistry(this); 74 HTMLMediaSource::setRegistry(this);
74 } 75 }
75 76
76 } // namespace blink 77 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathValue.cpp ('k') | third_party/WebKit/Source/wtf/Allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698