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

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

Issue 5362003: Stopgap fix for crash in issue 53867 comment 15 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 10 years 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) 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 "null", // frame origin 747 "null", // frame origin
748 "null", // main_frame_origin 748 "null", // main_frame_origin
749 base::GetCurrentProcId(), 749 base::GetCurrentProcId(),
750 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, 750 appcache_host ? appcache_host->host_id() : appcache::kNoHostId,
751 0); 751 0);
752 752
753 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( 753 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
754 new webkit_glue::VideoRendererImpl(false)); 754 new webkit_glue::VideoRendererImpl(false));
755 collection->AddVideoRenderer(video_renderer); 755 collection->AddVideoRenderer(video_renderer);
756 756
757 return new webkit_glue::WebMediaPlayerImpl( 757 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result(
758 client, collection.release(), bridge_factory_simple, 758 new webkit_glue::WebMediaPlayerImpl(client, collection.release()));
759 bridge_factory_buffered, false, video_renderer); 759 if (!result->Initialize(bridge_factory_simple,
760 bridge_factory_buffered,
761 false,
762 video_renderer)) {
763 return NULL;
764 }
765 return result.release();
760 } 766 }
761 767
762 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( 768 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost(
763 WebFrame* frame, WebApplicationCacheHostClient* client) { 769 WebFrame* frame, WebApplicationCacheHostClient* client) {
764 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 770 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
765 } 771 }
766 772
767 bool TestWebViewDelegate::allowPlugins(WebFrame* frame, 773 bool TestWebViewDelegate::allowPlugins(WebFrame* frame,
768 bool enabled_per_settings) { 774 bool enabled_per_settings) {
769 return enabled_per_settings && shell_->allow_plugins(); 775 return enabled_per_settings && shell_->allow_plugins();
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 } 1358 }
1353 1359
1354 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1360 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1355 fake_rect_ = rect; 1361 fake_rect_ = rect;
1356 using_fake_rect_ = true; 1362 using_fake_rect_ = true;
1357 } 1363 }
1358 1364
1359 WebRect TestWebViewDelegate::fake_window_rect() { 1365 WebRect TestWebViewDelegate::fake_window_rect() {
1360 return fake_rect_; 1366 return fake_rect_;
1361 } 1367 }
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