OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 29 matching lines...) Expand all Loading... |
40 #include "core/dom/Microtask.h" | 40 #include "core/dom/Microtask.h" |
41 #include "core/frame/Settings.h" | 41 #include "core/frame/Settings.h" |
42 #include "core/page/Page.h" | 42 #include "core/page/Page.h" |
43 #include "core/workers/WorkerGlobalScopeProxy.h" | 43 #include "core/workers/WorkerGlobalScopeProxy.h" |
44 #include "gin/public/v8_platform.h" | 44 #include "gin/public/v8_platform.h" |
45 #include "modules/InitModules.h" | 45 #include "modules/InitModules.h" |
46 #include "platform/LayoutTestSupport.h" | 46 #include "platform/LayoutTestSupport.h" |
47 #include "platform/Logging.h" | 47 #include "platform/Logging.h" |
48 #include "platform/RuntimeEnabledFeatures.h" | 48 #include "platform/RuntimeEnabledFeatures.h" |
49 #include "platform/graphics/ImageDecodingStore.h" | 49 #include "platform/graphics/ImageDecodingStore.h" |
50 #include "platform/graphics/media/MediaPlayer.h" | |
51 #include "platform/heap/Heap.h" | 50 #include "platform/heap/Heap.h" |
52 #include "platform/heap/glue/MessageLoopInterruptor.h" | 51 #include "platform/heap/glue/MessageLoopInterruptor.h" |
53 #include "platform/heap/glue/PendingGCRunner.h" | 52 #include "platform/heap/glue/PendingGCRunner.h" |
54 #include "public/platform/Platform.h" | 53 #include "public/platform/Platform.h" |
55 #include "public/platform/WebPrerenderingSupport.h" | 54 #include "public/platform/WebPrerenderingSupport.h" |
56 #include "public/platform/WebThread.h" | 55 #include "public/platform/WebThread.h" |
57 #include "web/IndexedDBClientImpl.h" | 56 #include "web/IndexedDBClientImpl.h" |
58 #include "web/WebMediaPlayerClientImpl.h" | |
59 #include "wtf/Assertions.h" | 57 #include "wtf/Assertions.h" |
60 #include "wtf/CryptographicallyRandomNumber.h" | 58 #include "wtf/CryptographicallyRandomNumber.h" |
61 #include "wtf/MainThread.h" | 59 #include "wtf/MainThread.h" |
62 #include "wtf/WTF.h" | 60 #include "wtf/WTF.h" |
63 #include "wtf/text/AtomicString.h" | 61 #include "wtf/text/AtomicString.h" |
64 #include "wtf/text/TextEncoding.h" | 62 #include "wtf/text/TextEncoding.h" |
65 #include <v8.h> | 63 #include <v8.h> |
66 | 64 |
67 namespace blink { | 65 namespace blink { |
68 | 66 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 182 |
185 ASSERT(!s_messageLoopInterruptor); | 183 ASSERT(!s_messageLoopInterruptor); |
186 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); | 184 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); |
187 ThreadState::current()->addInterruptor(s_messageLoopInterruptor); | 185 ThreadState::current()->addInterruptor(s_messageLoopInterruptor); |
188 } | 186 } |
189 | 187 |
190 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); | 188 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); |
191 initializer.init(); | 189 initializer.init(); |
192 | 190 |
193 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); | 191 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); |
194 | |
195 MediaPlayer::setMediaEngineCreateFunction(WebMediaPlayerClientImpl::create); | |
196 } | 192 } |
197 | 193 |
198 void shutdown() | 194 void shutdown() |
199 { | 195 { |
200 // currentThread() is null if we are running on a thread without a message l
oop. | 196 // currentThread() is null if we are running on a thread without a message l
oop. |
201 if (Platform::current()->currentThread()) { | 197 if (Platform::current()->currentThread()) { |
202 // We don't need to (cannot) remove s_endOfTaskRunner from the current | 198 // We don't need to (cannot) remove s_endOfTaskRunner from the current |
203 // message loop, because the message loop is already destructed before | 199 // message loop, because the message loop is already destructed before |
204 // the shutdown() is called. | 200 // the shutdown() is called. |
205 delete s_endOfTaskRunner; | 201 delete s_endOfTaskRunner; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 #endif // !LOG_DISABLED | 279 #endif // !LOG_DISABLED |
284 } | 280 } |
285 | 281 |
286 void resetPluginCache(bool reloadPages) | 282 void resetPluginCache(bool reloadPages) |
287 { | 283 { |
288 ASSERT(!reloadPages); | 284 ASSERT(!reloadPages); |
289 Page::refreshPlugins(); | 285 Page::refreshPlugins(); |
290 } | 286 } |
291 | 287 |
292 } // namespace blink | 288 } // namespace blink |
OLD | NEW |