| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" | 48 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" |
| 49 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 49 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| 50 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" | 50 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
| 51 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" | 51 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" |
| 52 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" | 52 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" |
| 53 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" | 53 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" |
| 54 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 54 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
| 55 #include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h" | 55 #include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h" |
| 56 #include "webkit/appcache/web_application_cache_host_impl.h" | 56 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 57 #include "webkit/glue/glue_serialize.h" | 57 #include "webkit/glue/glue_serialize.h" |
| 58 #include "webkit/glue/media/buffered_data_source.h" | |
| 59 #include "webkit/glue/media/media_resource_loader_bridge_factory.h" | |
| 60 #include "webkit/glue/media/simple_data_source.h" | |
| 61 #include "webkit/glue/media/video_renderer_impl.h" | 58 #include "webkit/glue/media/video_renderer_impl.h" |
| 62 #include "webkit/glue/plugins/webplugin_impl.h" | 59 #include "webkit/glue/plugins/webplugin_impl.h" |
| 63 #include "webkit/glue/plugins/plugin_list.h" | 60 #include "webkit/glue/plugins/plugin_list.h" |
| 64 #include "webkit/glue/plugins/webplugin_delegate_impl.h" | 61 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
| 65 #include "webkit/glue/webdropdata.h" | 62 #include "webkit/glue/webdropdata.h" |
| 66 #include "webkit/glue/webkit_glue.h" | 63 #include "webkit/glue/webkit_glue.h" |
| 67 #include "webkit/glue/webmediaplayer_impl.h" | 64 #include "webkit/glue/webmediaplayer_impl.h" |
| 68 #include "webkit/glue/webpreferences.h" | 65 #include "webkit/glue/webpreferences.h" |
| 69 #include "webkit/glue/window_open_disposition.h" | 66 #include "webkit/glue/window_open_disposition.h" |
| 70 #include "webkit/tools/test_shell/accessibility_controller.h" | 67 #include "webkit/tools/test_shell/accessibility_controller.h" |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 WebWorker* TestWebViewDelegate::createWorker( | 719 WebWorker* TestWebViewDelegate::createWorker( |
| 723 WebFrame* frame, WebWorkerClient* client) { | 720 WebFrame* frame, WebWorkerClient* client) { |
| 724 return new TestWebWorker(); | 721 return new TestWebWorker(); |
| 725 } | 722 } |
| 726 | 723 |
| 727 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( | 724 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
| 728 WebFrame* frame, WebMediaPlayerClient* client) { | 725 WebFrame* frame, WebMediaPlayerClient* client) { |
| 729 scoped_ptr<media::FilterCollection> collection( | 726 scoped_ptr<media::FilterCollection> collection( |
| 730 new media::FilterCollection()); | 727 new media::FilterCollection()); |
| 731 | 728 |
| 732 // TODO(annacc): do we still need appcache_host? http://crbug.com/65135 | |
| 733 // appcache::WebApplicationCacheHostImpl* appcache_host = | |
| 734 // appcache::WebApplicationCacheHostImpl::FromFrame(frame); | |
| 735 | |
| 736 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 729 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
| 737 new webkit_glue::VideoRendererImpl(false)); | 730 new webkit_glue::VideoRendererImpl(false)); |
| 738 collection->AddVideoRenderer(video_renderer); | 731 collection->AddVideoRenderer(video_renderer); |
| 739 | 732 |
| 740 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 733 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
| 741 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); | 734 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); |
| 742 if (!result->Initialize(frame, false, video_renderer)) { | 735 if (!result->Initialize(frame, false, video_renderer)) { |
| 743 return NULL; | 736 return NULL; |
| 744 } | 737 } |
| 745 return result.release(); | 738 return result.release(); |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1338 } | 1331 } |
| 1339 | 1332 |
| 1340 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1333 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
| 1341 fake_rect_ = rect; | 1334 fake_rect_ = rect; |
| 1342 using_fake_rect_ = true; | 1335 using_fake_rect_ = true; |
| 1343 } | 1336 } |
| 1344 | 1337 |
| 1345 WebRect TestWebViewDelegate::fake_window_rect() { | 1338 WebRect TestWebViewDelegate::fake_window_rect() { |
| 1346 return fake_rect_; | 1339 return fake_rect_; |
| 1347 } | 1340 } |
| OLD | NEW |