| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 } | 525 } |
| 526 #endif // defined (OS_MACOSX) | 526 #endif // defined (OS_MACOSX) |
| 527 | 527 |
| 528 return new webkit::npapi::WebPluginImpl( | 528 return new webkit::npapi::WebPluginImpl( |
| 529 frame, params, plugins.front().path, AsWeakPtr()); | 529 frame, params, plugins.front().path, AsWeakPtr()); |
| 530 } | 530 } |
| 531 | 531 |
| 532 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( | 532 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
| 533 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) { | 533 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) { |
| 534 webkit_media::WebMediaPlayerParams params( | 534 webkit_media::WebMediaPlayerParams params( |
| 535 NULL, NULL, NULL, new media::MediaLog()); | 535 NULL, NULL, new media::MediaLog()); |
| 536 return new webkit_media::WebMediaPlayerImpl( | 536 return new webkit_media::WebMediaPlayerImpl( |
| 537 frame, | 537 frame, |
| 538 client, | 538 client, |
| 539 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), | 539 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), |
| 540 params); | 540 params); |
| 541 } | 541 } |
| 542 | 542 |
| 543 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( | 543 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( |
| 544 WebFrame* frame, WebApplicationCacheHostClient* client) { | 544 WebFrame* frame, WebApplicationCacheHostClient* client) { |
| 545 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 545 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1027 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
| 1028 fake_rect_ = rect; | 1028 fake_rect_ = rect; |
| 1029 using_fake_rect_ = true; | 1029 using_fake_rect_ = true; |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 WebRect TestWebViewDelegate::fake_window_rect() { | 1032 WebRect TestWebViewDelegate::fake_window_rect() { |
| 1033 return fake_rect_; | 1033 return fake_rect_; |
| 1034 } | 1034 } |
| OLD | NEW |