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

Side by Side Diff: content/renderer/render_view_impl.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: 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
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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 RenderThreadImpl::current()->EstablishGpuChannelSync( 1961 RenderThreadImpl::current()->EstablishGpuChannelSync(
1962 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 1962 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
1963 collection->AddVideoDecoder(new media::GpuVideoDecoder( 1963 collection->AddVideoDecoder(new media::GpuVideoDecoder(
1964 MessageLoop::current(), 1964 MessageLoop::current(),
1965 scoped_ptr<media::GpuVideoDecoder::Factories>( 1965 scoped_ptr<media::GpuVideoDecoder::Factories>(
1966 new RendererGpuVideoDecoderFactories( 1966 new RendererGpuVideoDecoderFactories(
1967 gpu_channel_host, context3d->context()->AsWeakPtr())))); 1967 gpu_channel_host, context3d->context()->AsWeakPtr()))));
1968 } 1968 }
1969 #endif 1969 #endif
1970 1970
1971 webkit_media::WebMediaPlayerImpl* result_ptr; 1971 webkit_media::WebMediaPlayerImpl* media_player = NULL;
1972 if (!content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( 1972 if (!content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer(
1973 this, client, AsWeakPtr(), collection, audio_source_provider, 1973 this, client, AsWeakPtr(), collection, audio_source_provider,
1974 message_loop_factory, media_stream_impl_.get(), render_media_log, 1974 message_loop_factory, media_stream_impl_.get(), render_media_log,
1975 &result_ptr)) { 1975 &media_player)) {
1976 result_ptr = new webkit_media::WebMediaPlayerImpl( 1976 media_player = new webkit_media::WebMediaPlayerImpl(
1977 client, AsWeakPtr(), collection, audio_source_provider, 1977 client, AsWeakPtr(), collection, audio_source_provider,
1978 message_loop_factory, media_stream_impl_.get(), render_media_log); 1978 message_loop_factory, media_stream_impl_.get(), render_media_log);
1979 } 1979 }
1980 1980
1981 DCHECK(result_ptr); 1981 DCHECK(media_player);
1982 scoped_ptr<webkit_media::WebMediaPlayerImpl> result; 1982 media_player->Initialize(frame);
1983 result.reset(result_ptr); 1983 return media_player;
1984
1985 if (!result->Initialize(frame,
1986 cmd_line->HasSwitch(switches::kSimpleDataSource))) {
1987 return NULL;
1988 }
1989 return result.release();
1990 } 1984 }
1991 1985
1992 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( 1986 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost(
1993 WebFrame* frame, WebApplicationCacheHostClient* client) { 1987 WebFrame* frame, WebApplicationCacheHostClient* client) {
1994 if (!frame || !frame->view()) 1988 if (!frame || !frame->view())
1995 return NULL; 1989 return NULL;
1996 return new RendererWebApplicationCacheHostImpl( 1990 return new RendererWebApplicationCacheHostImpl(
1997 FromWebView(frame->view()), client, 1991 FromWebView(frame->view()), client,
1998 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); 1992 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy());
1999 } 1993 }
(...skipping 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after
4821 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 4815 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
4822 return !!RenderThreadImpl::current()->compositor_thread(); 4816 return !!RenderThreadImpl::current()->compositor_thread();
4823 } 4817 }
4824 4818
4825 void RenderViewImpl::OnJavaBridgeInit() { 4819 void RenderViewImpl::OnJavaBridgeInit() {
4826 DCHECK(!java_bridge_dispatcher_.get()); 4820 DCHECK(!java_bridge_dispatcher_.get());
4827 #if defined(ENABLE_JAVA_BRIDGE) 4821 #if defined(ENABLE_JAVA_BRIDGE)
4828 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 4822 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
4829 #endif 4823 #endif
4830 } 4824 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698