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

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: Applied more CR suggestions & removed message_loop() methods where possible. 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
« no previous file with comments | « webkit/glue/webmediaplayer_impl.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_context.h" 7 #include "app/gfx/gl/gl_context.h"
8 #include "app/gfx/gl/gl_implementation.h" 8 #include "app/gfx/gl/gl_implementation.h"
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/debugger.h" 12 #include "base/debug/debugger.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/message_loop.h" 17 #include "base/message_loop.h"
18 #include "base/path_service.h" 18 #include "base/path_service.h"
19 #include "base/process_util.h" 19 #include "base/process_util.h"
20 #include "base/string_piece.h" 20 #include "base/string_piece.h"
21 #include "base/string_util.h" 21 #include "base/string_util.h"
22 #include "base/stringprintf.h" 22 #include "base/stringprintf.h"
23 #include "base/sys_string_conversions.h" 23 #include "base/sys_string_conversions.h"
24 #include "base/time.h" 24 #include "base/time.h"
25 #include "base/utf_string_conversions.h" 25 #include "base/utf_string_conversions.h"
26 #include "base/weak_ptr.h" 26 #include "base/weak_ptr.h"
27 #include "grit/webkit_chromium_resources.h" 27 #include "grit/webkit_chromium_resources.h"
28 #include "media/base/filter_collection.h" 28 #include "media/base/filter_collection.h"
29 #include "media/base/message_loop_factory_impl.h"
29 #include "net/base/escape.h" 30 #include "net/base/escape.h"
30 #include "net/base/net_errors.h" 31 #include "net/base/net_errors.h"
31 #include "net/base/net_util.h" 32 #include "net/base/net_util.h"
32 #include "testing/gtest/include/gtest/gtest.h" 33 #include "testing/gtest/include/gtest/gtest.h"
33 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" 34 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
34 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" 35 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
35 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
36 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" 37 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
37 #include "webkit/appcache/web_application_cache_host_impl.h" 38 #include "webkit/appcache/web_application_cache_host_impl.h"
38 #include "webkit/glue/media/video_renderer_impl.h" 39 #include "webkit/glue/media/video_renderer_impl.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 &actual_mime_type) || !info.enabled) { 260 &actual_mime_type) || !info.enabled) {
260 return NULL; 261 return NULL;
261 } 262 }
262 263
263 return new WebPluginImplWithPageDelegate( 264 return new WebPluginImplWithPageDelegate(
264 frame, params, info.path, actual_mime_type); 265 frame, params, info.path, actual_mime_type);
265 } 266 }
266 267
267 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, 268 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame,
268 WebMediaPlayerClient* client) { 269 WebMediaPlayerClient* client) {
270 scoped_ptr<media::MessageLoopFactory> message_loop_factory(
271 new media::MessageLoopFactoryImpl());
272
269 scoped_ptr<media::FilterCollection> collection( 273 scoped_ptr<media::FilterCollection> collection(
270 new media::FilterCollection()); 274 new media::FilterCollection());
271 275
272 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( 276 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
273 new webkit_glue::VideoRendererImpl(false)); 277 new webkit_glue::VideoRendererImpl(false));
274 collection->AddVideoRenderer(video_renderer); 278 collection->AddVideoRenderer(video_renderer);
275 279
276 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( 280 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result(
277 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); 281 new webkit_glue::WebMediaPlayerImpl(client,
282 collection.release(),
283 message_loop_factory.release()));
278 if (!result->Initialize(frame, false, video_renderer)) { 284 if (!result->Initialize(frame, false, video_renderer)) {
279 return NULL; 285 return NULL;
280 } 286 }
281 return result.release(); 287 return result.release();
282 } 288 }
283 289
284 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( 290 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
285 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { 291 WebFrame*, WebKit::WebApplicationCacheHostClient* client) {
286 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 292 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
287 } 293 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 545
540 // FileSystem 546 // FileSystem
541 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, 547 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
542 long long size, bool create, WebFileSystemCallbacks* callbacks) { 548 long long size, bool create, WebFileSystemCallbacks* callbacks) {
543 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( 549 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
544 test_environment->webkit_client()->fileSystem()); 550 test_environment->webkit_client()->fileSystem());
545 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); 551 fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
546 } 552 }
547 553
548 } // namespace webkit_support 554 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/glue/webmediaplayer_impl.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698