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 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" | 53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" |
54 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" | 54 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" |
55 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" | 55 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" |
56 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 56 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
57 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 57 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
59 #include "ui/gfx/native_widget_types.h" | 59 #include "ui/gfx/native_widget_types.h" |
60 #include "ui/gfx/point.h" | 60 #include "ui/gfx/point.h" |
61 #include "webkit/appcache/web_application_cache_host_impl.h" | 61 #include "webkit/appcache/web_application_cache_host_impl.h" |
62 #include "webkit/glue/glue_serialize.h" | 62 #include "webkit/glue/glue_serialize.h" |
63 #include "webkit/glue/media/video_renderer_impl.h" | |
64 #include "webkit/glue/webdropdata.h" | 63 #include "webkit/glue/webdropdata.h" |
65 #include "webkit/glue/webkit_glue.h" | 64 #include "webkit/glue/webkit_glue.h" |
66 #include "webkit/glue/webmediaplayer_impl.h" | |
67 #include "webkit/glue/webpreferences.h" | 65 #include "webkit/glue/webpreferences.h" |
68 #include "webkit/glue/window_open_disposition.h" | 66 #include "webkit/glue/window_open_disposition.h" |
| 67 #include "webkit/media/video_renderer_impl.h" |
| 68 #include "webkit/media/webmediaplayer_impl.h" |
69 #include "webkit/plugins/npapi/webplugin_impl.h" | 69 #include "webkit/plugins/npapi/webplugin_impl.h" |
70 #include "webkit/plugins/npapi/plugin_list.h" | 70 #include "webkit/plugins/npapi/plugin_list.h" |
71 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 71 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
72 #include "webkit/tools/test_shell/mock_spellcheck.h" | 72 #include "webkit/tools/test_shell/mock_spellcheck.h" |
73 #include "webkit/tools/test_shell/notification_presenter.h" | 73 #include "webkit/tools/test_shell/notification_presenter.h" |
74 #include "webkit/tools/test_shell/simple_appcache_system.h" | 74 #include "webkit/tools/test_shell/simple_appcache_system.h" |
75 #include "webkit/tools/test_shell/simple_file_system.h" | 75 #include "webkit/tools/test_shell/simple_file_system.h" |
76 #include "webkit/tools/test_shell/test_navigation_controller.h" | 76 #include "webkit/tools/test_shell/test_navigation_controller.h" |
77 #include "webkit/tools/test_shell/test_shell.h" | 77 #include "webkit/tools/test_shell/test_shell.h" |
78 | 78 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 } | 640 } |
641 | 641 |
642 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( | 642 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
643 WebFrame* frame, WebMediaPlayerClient* client) { | 643 WebFrame* frame, WebMediaPlayerClient* client) { |
644 scoped_ptr<media::MessageLoopFactory> message_loop_factory( | 644 scoped_ptr<media::MessageLoopFactory> message_loop_factory( |
645 new media::MessageLoopFactoryImpl()); | 645 new media::MessageLoopFactoryImpl()); |
646 | 646 |
647 scoped_ptr<media::FilterCollection> collection( | 647 scoped_ptr<media::FilterCollection> collection( |
648 new media::FilterCollection()); | 648 new media::FilterCollection()); |
649 | 649 |
650 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 650 scoped_refptr<webkit_media::VideoRendererImpl> video_renderer( |
651 new webkit_glue::VideoRendererImpl(false)); | 651 new webkit_media::VideoRendererImpl(false)); |
652 collection->AddVideoRenderer(video_renderer); | 652 collection->AddVideoRenderer(video_renderer); |
653 | 653 |
654 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 654 scoped_ptr<webkit_media::WebMediaPlayerImpl> result( |
655 new webkit_glue::WebMediaPlayerImpl( | 655 new webkit_media::WebMediaPlayerImpl( |
656 client, | 656 client, |
657 base::WeakPtr<webkit_glue::WebMediaPlayerDelegate>(), | 657 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), |
658 collection.release(), | 658 collection.release(), |
659 message_loop_factory.release(), | 659 message_loop_factory.release(), |
660 NULL, | 660 NULL, |
661 new media::MediaLog())); | 661 new media::MediaLog())); |
662 if (!result->Initialize(frame, false, video_renderer)) { | 662 if (!result->Initialize(frame, false, video_renderer)) { |
663 return NULL; | 663 return NULL; |
664 } | 664 } |
665 return result.release(); | 665 return result.release(); |
666 } | 666 } |
667 | 667 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 } | 1155 } |
1156 | 1156 |
1157 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1157 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1158 fake_rect_ = rect; | 1158 fake_rect_ = rect; |
1159 using_fake_rect_ = true; | 1159 using_fake_rect_ = true; |
1160 } | 1160 } |
1161 | 1161 |
1162 WebRect TestWebViewDelegate::fake_window_rect() { | 1162 WebRect TestWebViewDelegate::fake_window_rect() { |
1163 return fake_rect_; | 1163 return fake_rect_; |
1164 } | 1164 } |
OLD | NEW |