Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 9195001: Remove --simple-data-source and convert WebMediaPlayerImpl::Initialize() to a void function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: no dcheck Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 640 }
641 641
642 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( 642 WebMediaPlayer* TestWebViewDelegate::createMediaPlayer(
643 WebFrame* frame, WebMediaPlayerClient* client) { 643 WebFrame* frame, WebMediaPlayerClient* client) {
644 scoped_ptr<media::MessageLoopFactory> message_loop_factory( 644 scoped_ptr<media::MessageLoopFactory> message_loop_factory(
645 new media::MessageLoopFactoryImpl()); 645 new media::MessageLoopFactoryImpl());
646 646
647 scoped_ptr<media::FilterCollection> collection( 647 scoped_ptr<media::FilterCollection> collection(
648 new media::FilterCollection()); 648 new media::FilterCollection());
649 649
650 scoped_ptr<webkit_media::WebMediaPlayerImpl> result( 650 webkit_media::WebMediaPlayerImpl* media_player =
651 new webkit_media::WebMediaPlayerImpl( 651 new webkit_media::WebMediaPlayerImpl(
652 client, 652 client,
653 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), 653 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(),
654 collection.release(), 654 collection.release(),
655 NULL, 655 NULL,
656 message_loop_factory.release(), 656 message_loop_factory.release(),
657 NULL, 657 NULL,
658 new media::MediaLog())); 658 new media::MediaLog());
659 if (!result->Initialize(frame, false)) { 659 media_player->Initialize(frame);
660 return NULL; 660 return media_player;
661 }
662 return result.release();
663 } 661 }
664 662
665 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( 663 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost(
666 WebFrame* frame, WebApplicationCacheHostClient* client) { 664 WebFrame* frame, WebApplicationCacheHostClient* client) {
667 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 665 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
668 } 666 }
669 667
670 bool TestWebViewDelegate::allowPlugins(WebFrame* frame, 668 bool TestWebViewDelegate::allowPlugins(WebFrame* frame,
671 bool enabled_per_settings) { 669 bool enabled_per_settings) {
672 return enabled_per_settings && shell_->allow_plugins(); 670 return enabled_per_settings && shell_->allow_plugins();
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 } 1154 }
1157 1155
1158 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1156 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1159 fake_rect_ = rect; 1157 fake_rect_ = rect;
1160 using_fake_rect_ = true; 1158 using_fake_rect_ = true;
1161 } 1159 }
1162 1160
1163 WebRect TestWebViewDelegate::fake_window_rect() { 1161 WebRect TestWebViewDelegate::fake_window_rect() {
1164 return fake_rect_; 1162 return fake_rect_;
1165 } 1163 }
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698