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 "config.h" | 5 #include "config.h" |
6 #include "bindings/core/v8/V8DOMActivityLogger.h" | 6 #include "bindings/core/v8/V8DOMActivityLogger.h" |
7 | 7 |
8 #include "bindings/core/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
9 #include "platform/weborigin/KURL.h" | 9 #include "platform/weborigin/KURL.h" |
10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
11 #include "wtf/MainThread.h" | 11 #include "wtf/MainThread.h" |
12 #include "wtf/text/StringHash.h" | 12 #include "wtf/text/StringHash.h" |
13 | 13 |
14 namespace WebCore { | 14 namespace blink { |
15 | 15 |
16 typedef HashMap<String, OwnPtr<V8DOMActivityLogger> > DOMActivityLoggerMapForMai
nWorld; | 16 typedef HashMap<String, OwnPtr<V8DOMActivityLogger> > DOMActivityLoggerMapForMai
nWorld; |
17 typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::Unsign
edWithZeroKeyHashTraits<int> > DOMActivityLoggerMapForIsolatedWorld; | 17 typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::Unsign
edWithZeroKeyHashTraits<int> > DOMActivityLoggerMapForIsolatedWorld; |
18 | 18 |
19 static DOMActivityLoggerMapForMainWorld& domActivityLoggersForMainWorld() | 19 static DOMActivityLoggerMapForMainWorld& domActivityLoggersForMainWorld() |
20 { | 20 { |
21 ASSERT(isMainThread()); | 21 ASSERT(isMainThread()); |
22 DEFINE_STATIC_LOCAL(DOMActivityLoggerMapForMainWorld, map, ()); | 22 DEFINE_STATIC_LOCAL(DOMActivityLoggerMapForMainWorld, map, ()); |
23 return map; | 23 return map; |
24 } | 24 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (!scriptState->world().isIsolatedWorld()) | 100 if (!scriptState->world().isIsolatedWorld()) |
101 return 0; | 101 return 0; |
102 | 102 |
103 V8PerContextData* contextData = scriptState->perContextData(); | 103 V8PerContextData* contextData = scriptState->perContextData(); |
104 if (!contextData) | 104 if (!contextData) |
105 return 0; | 105 return 0; |
106 | 106 |
107 return contextData->activityLogger(); | 107 return contextData->activityLogger(); |
108 } | 108 } |
109 | 109 |
110 } // namespace WebCore | 110 } // namespace blink |
OLD | NEW |