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

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

Issue 8382012: Fix shutdown crash when WebMediaPlayerImpl is destroyed after RenderViewImpl is. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test callers Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 new media::MessageLoopFactoryImpl()); 651 new media::MessageLoopFactoryImpl());
652 652
653 scoped_ptr<media::FilterCollection> collection( 653 scoped_ptr<media::FilterCollection> collection(
654 new media::FilterCollection()); 654 new media::FilterCollection());
655 655
656 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( 656 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
657 new webkit_glue::VideoRendererImpl(false)); 657 new webkit_glue::VideoRendererImpl(false));
658 collection->AddVideoRenderer(video_renderer); 658 collection->AddVideoRenderer(video_renderer);
659 659
660 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( 660 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result(
661 new webkit_glue::WebMediaPlayerImpl(client, 661 new webkit_glue::WebMediaPlayerImpl(
662 NULL, 662 client,
663 collection.release(), 663 base::WeakPtr<webkit_glue::WebMediaPlayerDelegate>(),
664 message_loop_factory.release(), 664 collection.release(),
665 NULL, 665 message_loop_factory.release(),
666 new media::MediaLog())); 666 NULL,
667 new media::MediaLog()));
667 if (!result->Initialize(frame, false, video_renderer)) { 668 if (!result->Initialize(frame, false, video_renderer)) {
668 return NULL; 669 return NULL;
669 } 670 }
670 return result.release(); 671 return result.release();
671 } 672 }
672 673
673 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost( 674 WebApplicationCacheHost* TestWebViewDelegate::createApplicationCacheHost(
674 WebFrame* frame, WebApplicationCacheHostClient* client) { 675 WebFrame* frame, WebApplicationCacheHostClient* client) {
675 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 676 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
676 } 677 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 } 1161 }
1161 1162
1162 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1163 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1163 fake_rect_ = rect; 1164 fake_rect_ = rect;
1164 using_fake_rect_ = true; 1165 using_fake_rect_ = true;
1165 } 1166 }
1166 1167
1167 WebRect TestWebViewDelegate::fake_window_rect() { 1168 WebRect TestWebViewDelegate::fake_window_rect() {
1168 return fake_rect_; 1169 return fake_rect_;
1169 } 1170 }
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