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

Side by Side Diff: Source/web/WebKit.cpp

Issue 1055503002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 5 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
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/WebMediaPlayerClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/WebMediaPlayerClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698