OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 0); | 733 0); |
734 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_buffered = | 734 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_buffered = |
735 new webkit_glue::MediaResourceLoaderBridgeFactory( | 735 new webkit_glue::MediaResourceLoaderBridgeFactory( |
736 GURL(frame->url()), // referrer | 736 GURL(frame->url()), // referrer |
737 "null", // frame origin | 737 "null", // frame origin |
738 "null", // main_frame_origin | 738 "null", // main_frame_origin |
739 base::GetCurrentProcId(), | 739 base::GetCurrentProcId(), |
740 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, | 740 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, |
741 0); | 741 0); |
742 | 742 |
743 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer = | 743 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
744 new webkit_glue::VideoRendererImpl(false); | 744 new webkit_glue::VideoRendererImpl(false)); |
745 collection.push_back(video_renderer); | 745 collection.push_back(video_renderer); |
746 | 746 |
747 return new webkit_glue::WebMediaPlayerImpl( | 747 return new webkit_glue::WebMediaPlayerImpl( |
748 client, collection, bridge_factory_simple, bridge_factory_buffered, | 748 client, collection, bridge_factory_simple, bridge_factory_buffered, |
749 false, video_renderer); | 749 false, video_renderer); |
750 } | 750 } |
751 | 751 |
752 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( | 752 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( |
753 WebFrame* frame, WebApplicationCacheHostClient* client) { | 753 WebFrame* frame, WebApplicationCacheHostClient* client) { |
754 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 754 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 } | 1346 } |
1347 | 1347 |
1348 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1348 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
1349 fake_rect_ = rect; | 1349 fake_rect_ = rect; |
1350 using_fake_rect_ = true; | 1350 using_fake_rect_ = true; |
1351 } | 1351 } |
1352 | 1352 |
1353 WebRect TestWebViewDelegate::fake_window_rect() { | 1353 WebRect TestWebViewDelegate::fake_window_rect() { |
1354 return fake_rect_; | 1354 return fake_rect_; |
1355 } | 1355 } |
OLD | NEW |