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/Partitions.h" | 60 #include "wtf/Partitions.h" |
63 #include "wtf/WTF.h" | 61 #include "wtf/WTF.h" |
64 #include "wtf/text/AtomicString.h" | 62 #include "wtf/text/AtomicString.h" |
65 #include "wtf/text/TextEncoding.h" | 63 #include "wtf/text/TextEncoding.h" |
66 #include <v8.h> | 64 #include <v8.h> |
67 | 65 |
68 namespace blink { | 66 namespace blink { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 188 |
191 ASSERT(!s_messageLoopInterruptor); | 189 ASSERT(!s_messageLoopInterruptor); |
192 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); | 190 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); |
193 ThreadState::current()->addInterruptor(s_messageLoopInterruptor); | 191 ThreadState::current()->addInterruptor(s_messageLoopInterruptor); |
194 } | 192 } |
195 | 193 |
196 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); | 194 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); |
197 initializer.init(); | 195 initializer.init(); |
198 | 196 |
199 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); | 197 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); |
200 | |
201 MediaPlayer::setMediaEngineCreateFunction(WebMediaPlayerClientImpl::create); | |
202 } | 198 } |
203 | 199 |
204 void shutdown() | 200 void shutdown() |
205 { | 201 { |
206 // currentThread() is null if we are running on a thread without a message l
oop. | 202 // currentThread() is null if we are running on a thread without a message l
oop. |
207 if (Platform::current()->currentThread()) { | 203 if (Platform::current()->currentThread()) { |
208 // We don't need to (cannot) remove s_endOfTaskRunner from the current | 204 // We don't need to (cannot) remove s_endOfTaskRunner from the current |
209 // message loop, because the message loop is already destructed before | 205 // message loop, because the message loop is already destructed before |
210 // the shutdown() is called. | 206 // the shutdown() is called. |
211 delete s_endOfTaskRunner; | 207 delete s_endOfTaskRunner; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 ASSERT(!reloadPages); | 290 ASSERT(!reloadPages); |
295 Page::refreshPlugins(); | 291 Page::refreshPlugins(); |
296 } | 292 } |
297 | 293 |
298 void decommitFreeableMemory() | 294 void decommitFreeableMemory() |
299 { | 295 { |
300 WTF::Partitions::decommitFreeableMemory(); | 296 WTF::Partitions::decommitFreeableMemory(); |
301 } | 297 } |
302 | 298 |
303 } // namespace blink | 299 } // namespace blink |
OLD | NEW |