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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 11468033: Vanquish the remnants of media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file contains the implementation of TestWebViewDelegate, which serves 5 // This file contains the implementation of TestWebViewDelegate, which serves
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to
7 // have initialized a MessageLoop before these methods are called. 7 // have initialized a MessageLoop before these methods are called.
8 8
9 #include "webkit/tools/test_shell/test_webview_delegate.h" 9 #include "webkit/tools/test_shell/test_webview_delegate.h"
10 10
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/process_util.h" 14 #include "base/process_util.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "base/stringprintf.h" 16 #include "base/stringprintf.h"
17 #include "base/string_number_conversions.h" 17 #include "base/string_number_conversions.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "media/base/filter_collection.h" 19 #include "media/base/filter_collection.h"
20 #include "media/base/media_log.h" 20 #include "media/base/media_log.h"
21 #include "media/base/message_loop_factory.h"
22 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC lientMock.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC lientMock.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 26 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
28 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 } 523 }
525 } 524 }
526 #endif // defined (OS_MACOSX) 525 #endif // defined (OS_MACOSX)
527 526
528 return new webkit::npapi::WebPluginImpl( 527 return new webkit::npapi::WebPluginImpl(
529 frame, params, plugins.front().path, AsWeakPtr()); 528 frame, params, plugins.front().path, AsWeakPtr());
530 } 529 }
531 530
532 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( 531 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer(
533 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) { 532 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) {
534 scoped_ptr<media::MessageLoopFactory> message_loop_factory(
535 new media::MessageLoopFactory());
536
537 scoped_ptr<media::FilterCollection> collection(
538 new media::FilterCollection());
539
540 return new webkit_media::WebMediaPlayerImpl( 533 return new webkit_media::WebMediaPlayerImpl(
541 frame, 534 frame,
542 client, 535 client,
543 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), 536 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(),
544 collection.release(),
545 NULL, 537 NULL,
546 NULL, 538 NULL,
547 message_loop_factory.release(), 539 NULL,
548 NULL, 540 NULL,
549 new media::MediaLog()); 541 new media::MediaLog());
550 } 542 }
551 543
552 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( 544 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost(
553 WebFrame* frame, WebApplicationCacheHostClient* client) { 545 WebFrame* frame, WebApplicationCacheHostClient* client) {
554 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 546 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
555 } 547 }
556 548
557 bool TestWebViewDelegate::allowPlugins(WebFrame* frame, 549 bool TestWebViewDelegate::allowPlugins(WebFrame* frame,
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 } 1026 }
1035 1027
1036 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1028 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1037 fake_rect_ = rect; 1029 fake_rect_ = rect;
1038 using_fake_rect_ = true; 1030 using_fake_rect_ = true;
1039 } 1031 }
1040 1032
1041 WebRect TestWebViewDelegate::fake_window_rect() { 1033 WebRect TestWebViewDelegate::fake_window_rect() {
1042 return fake_rect_; 1034 return fake_rect_;
1043 } 1035 }
OLDNEW
« webkit/media/webmediaplayer_impl.cc ('K') | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698