| 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 "platform/scheduler/Scheduler.h" | 53 #include "platform/scheduler/Scheduler.h" |
| 55 #include "public/platform/Platform.h" | 54 #include "public/platform/Platform.h" |
| 56 #include "public/platform/WebPrerenderingSupport.h" | 55 #include "public/platform/WebPrerenderingSupport.h" |
| 57 #include "public/platform/WebThread.h" | 56 #include "public/platform/WebThread.h" |
| 58 #include "web/IndexedDBClientImpl.h" | 57 #include "web/IndexedDBClientImpl.h" |
| 59 #include "web/WebMediaPlayerClientImpl.h" | |
| 60 #include "wtf/Assertions.h" | 58 #include "wtf/Assertions.h" |
| 61 #include "wtf/CryptographicallyRandomNumber.h" | 59 #include "wtf/CryptographicallyRandomNumber.h" |
| 62 #include "wtf/MainThread.h" | 60 #include "wtf/MainThread.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 { |
| 69 | 67 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 173 |
| 176 ASSERT(!s_messageLoopInterruptor); | 174 ASSERT(!s_messageLoopInterruptor); |
| 177 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); | 175 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); |
| 178 ThreadState::current()->addInterruptor(s_messageLoopInterruptor); | 176 ThreadState::current()->addInterruptor(s_messageLoopInterruptor); |
| 179 } | 177 } |
| 180 | 178 |
| 181 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); | 179 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); |
| 182 initializer.init(); | 180 initializer.init(); |
| 183 | 181 |
| 184 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); | 182 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); |
| 185 | |
| 186 MediaPlayer::setMediaEngineCreateFunction(WebMediaPlayerClientImpl::create); | |
| 187 } | 183 } |
| 188 | 184 |
| 189 void shutdown() | 185 void shutdown() |
| 190 { | 186 { |
| 191 // currentThread() is null if we are running on a thread without a message l
oop. | 187 // currentThread() is null if we are running on a thread without a message l
oop. |
| 192 if (Platform::current()->currentThread()) { | 188 if (Platform::current()->currentThread()) { |
| 193 // We don't need to (cannot) remove s_endOfTaskRunner from the current | 189 // We don't need to (cannot) remove s_endOfTaskRunner from the current |
| 194 // message loop, because the message loop is already destructed before | 190 // message loop, because the message loop is already destructed before |
| 195 // the shutdown() is called. | 191 // the shutdown() is called. |
| 196 delete s_endOfTaskRunner; | 192 delete s_endOfTaskRunner; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 #endif // !LOG_DISABLED | 271 #endif // !LOG_DISABLED |
| 276 } | 272 } |
| 277 | 273 |
| 278 void resetPluginCache(bool reloadPages) | 274 void resetPluginCache(bool reloadPages) |
| 279 { | 275 { |
| 280 ASSERT(!reloadPages); | 276 ASSERT(!reloadPages); |
| 281 Page::refreshPlugins(); | 277 Page::refreshPlugins(); |
| 282 } | 278 } |
| 283 | 279 |
| 284 } // namespace blink | 280 } // namespace blink |
| OLD | NEW |