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