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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 new media::MessageLoopFactoryImpl()); | 651 new media::MessageLoopFactoryImpl()); |
652 | 652 |
653 scoped_ptr<media::FilterCollection> collection( | 653 scoped_ptr<media::FilterCollection> collection( |
654 new media::FilterCollection()); | 654 new media::FilterCollection()); |
655 | 655 |
656 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 656 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
657 new webkit_glue::VideoRendererImpl(false)); | 657 new webkit_glue::VideoRendererImpl(false)); |
658 collection->AddVideoRenderer(video_renderer); | 658 collection->AddVideoRenderer(video_renderer); |
659 | 659 |
660 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 660 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
661 new webkit_glue::WebMediaPlayerImpl(client, | 661 new webkit_glue::WebMediaPlayerImpl( |
662 NULL, | 662 client, |
663 collection.release(), | 663 base::WeakPtr<webkit_glue::WebMediaPlayerDelegate>(), |
664 message_loop_factory.release(), | 664 collection.release(), |
665 NULL, | 665 message_loop_factory.release(), |
666 new media::MediaLog())); | 666 NULL, |
| 667 new media::MediaLog())); |
667 if (!result->Initialize(frame, false, video_renderer)) { | 668 if (!result->Initialize(frame, false, video_renderer)) { |
668 return NULL; | 669 return NULL; |
669 } | 670 } |
670 return result.release(); | 671 return result.release(); |
671 } | 672 } |
672 | 673 |
673 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( | 674 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( |
674 WebFrame* frame, WebApplicationCacheHostClient* client) { | 675 WebFrame* frame, WebApplicationCacheHostClient* client) { |
675 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 676 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
676 } | 677 } |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 } | 1161 } |
1161 | 1162 |
1162 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1163 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1163 fake_rect_ = rect; | 1164 fake_rect_ = rect; |
1164 using_fake_rect_ = true; | 1165 using_fake_rect_ = true; |
1165 } | 1166 } |
1166 | 1167 |
1167 WebRect TestWebViewDelegate::fake_window_rect() { | 1168 WebRect TestWebViewDelegate::fake_window_rect() { |
1168 return fake_rect_; | 1169 return fake_rect_; |
1169 } | 1170 } |
OLD | NEW |