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 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
| 640 WebFrame* frame, WebMediaPlayerClient* client, const WebKit::WebURL& url) { |
| 641 return createMediaPlayer(frame, client); |
| 642 } |
| 643 |
638 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( | 644 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
639 WebFrame* frame, WebMediaPlayerClient* client) { | 645 WebFrame* frame, WebMediaPlayerClient* client) { |
640 scoped_ptr<media::MessageLoopFactory> message_loop_factory( | 646 scoped_ptr<media::MessageLoopFactory> message_loop_factory( |
641 new media::MessageLoopFactory()); | 647 new media::MessageLoopFactory()); |
642 | 648 |
643 scoped_ptr<media::FilterCollection> collection( | 649 scoped_ptr<media::FilterCollection> collection( |
644 new media::FilterCollection()); | 650 new media::FilterCollection()); |
645 | 651 |
646 return new webkit_media::WebMediaPlayerImpl( | 652 return new webkit_media::WebMediaPlayerImpl( |
647 frame, | 653 frame, |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 } | 1158 } |
1153 | 1159 |
1154 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1160 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1155 fake_rect_ = rect; | 1161 fake_rect_ = rect; |
1156 using_fake_rect_ = true; | 1162 using_fake_rect_ = true; |
1157 } | 1163 } |
1158 | 1164 |
1159 WebRect TestWebViewDelegate::fake_window_rect() { | 1165 WebRect TestWebViewDelegate::fake_window_rect() { |
1160 return fake_rect_; | 1166 return fake_rect_; |
1161 } | 1167 } |
OLD | NEW |