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

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

Issue 7480032: Plumb media data from renderers up to MediaInternals in the browser process. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Responding to feedback. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/message_loop_factory_impl.h" 21 #include "media/base/message_loop_factory_impl.h"
21 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC lientMock.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC lientMock.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 new media::FilterCollection()); 618 new media::FilterCollection());
618 619
619 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( 620 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
620 new webkit_glue::VideoRendererImpl(false)); 621 new webkit_glue::VideoRendererImpl(false));
621 collection->AddVideoRenderer(video_renderer); 622 collection->AddVideoRenderer(video_renderer);
622 623
623 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( 624 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result(
624 new webkit_glue::WebMediaPlayerImpl(client, 625 new webkit_glue::WebMediaPlayerImpl(client,
625 collection.release(), 626 collection.release(),
626 message_loop_factory.release(), 627 message_loop_factory.release(),
627 NULL)); 628 NULL,
629 new media::MediaLog()));
628 if (!result->Initialize(frame, false, video_renderer)) { 630 if (!result->Initialize(frame, false, video_renderer)) {
629 return NULL; 631 return NULL;
630 } 632 }
631 return result.release(); 633 return result.release();
632 } 634 }
633 635
634 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( 636 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost(
635 WebFrame* frame, WebApplicationCacheHostClient* client) { 637 WebFrame* frame, WebApplicationCacheHostClient* client) {
636 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 638 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
637 } 639 }
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1124 }
1123 1125
1124 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1126 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1125 fake_rect_ = rect; 1127 fake_rect_ = rect;
1126 using_fake_rect_ = true; 1128 using_fake_rect_ = true;
1127 } 1129 }
1128 1130
1129 WebRect TestWebViewDelegate::fake_window_rect() { 1131 WebRect TestWebViewDelegate::fake_window_rect() {
1130 return fake_rect_; 1132 return fake_rect_;
1131 } 1133 }
OLDNEW
« webkit/glue/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