| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 |
| 11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 604 |
| 605 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( | 605 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( |
| 606 WebFrame* frame, WebMediaPlayerClient* client) { | 606 WebFrame* frame, WebMediaPlayerClient* client) { |
| 607 scoped_refptr<media::FilterFactoryCollection> factory = | 607 scoped_refptr<media::FilterFactoryCollection> factory = |
| 608 new media::FilterFactoryCollection(); | 608 new media::FilterFactoryCollection(); |
| 609 | 609 |
| 610 // TODO(hclam): this is the same piece of code as in RenderView, maybe they | 610 // TODO(hclam): this is the same piece of code as in RenderView, maybe they |
| 611 // should be grouped together. | 611 // should be grouped together. |
| 612 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory = | 612 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory = |
| 613 new webkit_glue::MediaResourceLoaderBridgeFactory( | 613 new webkit_glue::MediaResourceLoaderBridgeFactory( |
| 614 GURL::EmptyGURL(), // referrer | 614 GURL(), // referrer |
| 615 "null", // frame origin | 615 "null", // frame origin |
| 616 "null", // main_frame_origin | 616 "null", // main_frame_origin |
| 617 base::GetCurrentProcId(), | 617 base::GetCurrentProcId(), |
| 618 appcache::kNoHostId, | 618 appcache::kNoHostId, |
| 619 0); | 619 0); |
| 620 // A simple data source that keeps all data in memory. | 620 // A simple data source that keeps all data in memory. |
| 621 media::FilterFactory* simple_data_source_factory = | 621 media::FilterFactory* simple_data_source_factory = |
| 622 webkit_glue::SimpleDataSource::CreateFactory(MessageLoop::current(), | 622 webkit_glue::SimpleDataSource::CreateFactory(MessageLoop::current(), |
| 623 bridge_factory); | 623 bridge_factory); |
| 624 // A sophisticated data source that does memory caching. | 624 // A sophisticated data source that does memory caching. |
| 625 media::FilterFactory* buffered_data_source_factory = | 625 media::FilterFactory* buffered_data_source_factory = |
| 626 webkit_glue::BufferedDataSource::CreateFactory(MessageLoop::current(), | 626 webkit_glue::BufferedDataSource::CreateFactory(MessageLoop::current(), |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1159 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
| 1160 fake_rect_ = rect; | 1160 fake_rect_ = rect; |
| 1161 using_fake_rect_ = true; | 1161 using_fake_rect_ = true; |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 WebRect TestWebViewDelegate::fake_window_rect() { | 1164 WebRect TestWebViewDelegate::fake_window_rect() { |
| 1165 return fake_rect_; | 1165 return fake_rect_; |
| 1166 } | 1166 } |
| OLD | NEW |