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

Side by Side Diff: webkit/support/webkit_support.cc

Issue 6171009: Remove MessageLoop methods from Filter interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "app/gfx/gl/gl_implementation.h" 7 #include "app/gfx/gl/gl_implementation.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/debugger.h" 11 #include "base/debug/debugger.h"
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/i18n/icu_util.h" 14 #include "base/i18n/icu_util.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/process_util.h" 18 #include "base/process_util.h"
19 #include "base/string_piece.h" 19 #include "base/string_piece.h"
20 #include "base/string_util.h" 20 #include "base/string_util.h"
21 #include "base/stringprintf.h" 21 #include "base/stringprintf.h"
22 #include "base/sys_string_conversions.h" 22 #include "base/sys_string_conversions.h"
23 #include "base/time.h" 23 #include "base/time.h"
24 #include "base/utf_string_conversions.h" 24 #include "base/utf_string_conversions.h"
25 #include "base/weak_ptr.h" 25 #include "base/weak_ptr.h"
26 #include "grit/webkit_chromium_resources.h" 26 #include "grit/webkit_chromium_resources.h"
27 #include "media/base/filter_collection.h" 27 #include "media/base/filter_collection.h"
28 #include "media/base/message_loop_factory_impl.h"
28 #include "net/base/escape.h" 29 #include "net/base/escape.h"
29 #include "net/base/net_errors.h" 30 #include "net/base/net_errors.h"
30 #include "net/base/net_util.h" 31 #include "net/base/net_util.h"
31 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
32 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" 33 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
33 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" 34 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
34 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" 35 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
35 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
36 #include "webkit/appcache/web_application_cache_host_impl.h" 37 #include "webkit/appcache/web_application_cache_host_impl.h"
37 #include "webkit/glue/media/video_renderer_impl.h" 38 #include "webkit/glue/media/video_renderer_impl.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 &actual_mime_type) || !info.enabled) { 259 &actual_mime_type) || !info.enabled) {
259 return NULL; 260 return NULL;
260 } 261 }
261 262
262 return new WebPluginImplWithPageDelegate( 263 return new WebPluginImplWithPageDelegate(
263 frame, params, info.path, actual_mime_type); 264 frame, params, info.path, actual_mime_type);
264 } 265 }
265 266
266 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, 267 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame,
267 WebMediaPlayerClient* client) { 268 WebMediaPlayerClient* client) {
269 scoped_refptr<media::MessageLoopFactory> message_loop_factory(
270 new media::MessageLoopFactoryImpl());
271
268 scoped_ptr<media::FilterCollection> collection( 272 scoped_ptr<media::FilterCollection> collection(
269 new media::FilterCollection()); 273 new media::FilterCollection());
270 274
271 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( 275 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
272 new webkit_glue::VideoRendererImpl(false)); 276 new webkit_glue::VideoRendererImpl(false));
273 collection->AddVideoRenderer(video_renderer); 277 collection->AddVideoRenderer(video_renderer);
274 278
275 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( 279 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result(
276 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); 280 new webkit_glue::WebMediaPlayerImpl(client, collection.release(),
281 message_loop_factory));
277 if (!result->Initialize(frame, false, video_renderer)) { 282 if (!result->Initialize(frame, false, video_renderer)) {
278 return NULL; 283 return NULL;
279 } 284 }
280 return result.release(); 285 return result.release();
281 } 286 }
282 287
283 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( 288 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
284 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { 289 WebFrame*, WebKit::WebApplicationCacheHostClient* client) {
285 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 290 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
286 } 291 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 530
526 // FileSystem 531 // FileSystem
527 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, 532 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
528 long long size, bool create, WebFileSystemCallbacks* callbacks) { 533 long long size, bool create, WebFileSystemCallbacks* callbacks) {
529 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( 534 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
530 test_environment->webkit_client()->fileSystem()); 535 test_environment->webkit_client()->fileSystem());
531 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); 536 fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
532 } 537 }
533 538
534 } // namespace webkit_support 539 } // namespace webkit_support
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698