OLD | NEW |
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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 new media::FilterCollection()); | 619 new media::FilterCollection()); |
619 | 620 |
620 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 621 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
621 new webkit_glue::VideoRendererImpl(false)); | 622 new webkit_glue::VideoRendererImpl(false)); |
622 collection->AddVideoRenderer(video_renderer); | 623 collection->AddVideoRenderer(video_renderer); |
623 | 624 |
624 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 625 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
625 new webkit_glue::WebMediaPlayerImpl(client, | 626 new webkit_glue::WebMediaPlayerImpl(client, |
626 collection.release(), | 627 collection.release(), |
627 message_loop_factory.release(), | 628 message_loop_factory.release(), |
628 NULL)); | 629 NULL, |
| 630 new media::MediaLog())); |
629 if (!result->Initialize(frame, false, video_renderer)) { | 631 if (!result->Initialize(frame, false, video_renderer)) { |
630 return NULL; | 632 return NULL; |
631 } | 633 } |
632 return result.release(); | 634 return result.release(); |
633 } | 635 } |
634 | 636 |
635 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( | 637 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( |
636 WebFrame* frame, WebApplicationCacheHostClient* client) { | 638 WebFrame* frame, WebApplicationCacheHostClient* client) { |
637 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 639 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
638 } | 640 } |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 } | 1125 } |
1124 | 1126 |
1125 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1127 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1126 fake_rect_ = rect; | 1128 fake_rect_ = rect; |
1127 using_fake_rect_ = true; | 1129 using_fake_rect_ = true; |
1128 } | 1130 } |
1129 | 1131 |
1130 WebRect TestWebViewDelegate::fake_window_rect() { | 1132 WebRect TestWebViewDelegate::fake_window_rect() { |
1131 return fake_rect_; | 1133 return fake_rect_; |
1132 } | 1134 } |
OLD | NEW |