OLD | NEW |
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 |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 return new webkit::npapi::WebPluginImpl( | 628 return new webkit::npapi::WebPluginImpl( |
629 frame, params_copy, plugins.front().path, AsWeakPtr()); | 629 frame, params_copy, plugins.front().path, AsWeakPtr()); |
630 } | 630 } |
631 } | 631 } |
632 #endif // defined (OS_MACOSX) | 632 #endif // defined (OS_MACOSX) |
633 | 633 |
634 return new webkit::npapi::WebPluginImpl( | 634 return new webkit::npapi::WebPluginImpl( |
635 frame, params, plugins.front().path, AsWeakPtr()); | 635 frame, params, plugins.front().path, AsWeakPtr()); |
636 } | 636 } |
637 | 637 |
| 638 // TODO(wjia): remove the version without url when WebKit change is done. |
| 639 // http://webk.it/91301. |
| 640 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
| 641 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) { |
| 642 return createMediaPlayer(frame, client); |
| 643 } |
| 644 |
638 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( | 645 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
639 WebFrame* frame, WebMediaPlayerClient* client) { | 646 WebFrame* frame, WebMediaPlayerClient* client) { |
640 scoped_ptr<media::MessageLoopFactory> message_loop_factory( | 647 scoped_ptr<media::MessageLoopFactory> message_loop_factory( |
641 new media::MessageLoopFactory()); | 648 new media::MessageLoopFactory()); |
642 | 649 |
643 scoped_ptr<media::FilterCollection> collection( | 650 scoped_ptr<media::FilterCollection> collection( |
644 new media::FilterCollection()); | 651 new media::FilterCollection()); |
645 | 652 |
646 return new webkit_media::WebMediaPlayerImpl( | 653 return new webkit_media::WebMediaPlayerImpl( |
647 frame, | 654 frame, |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 } | 1147 } |
1141 | 1148 |
1142 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1149 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1143 fake_rect_ = rect; | 1150 fake_rect_ = rect; |
1144 using_fake_rect_ = true; | 1151 using_fake_rect_ = true; |
1145 } | 1152 } |
1146 | 1153 |
1147 WebRect TestWebViewDelegate::fake_window_rect() { | 1154 WebRect TestWebViewDelegate::fake_window_rect() { |
1148 return fake_rect_; | 1155 return fake_rect_; |
1149 } | 1156 } |
OLD | NEW |