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

Side by Side Diff: content/renderer/pepper/ppb_video_decoder_impl.cc

Issue 20987009: Rename PepperPluginDelegateImpl to PepperHelperImpl after getting rid of the PluginDelegate interfa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 4 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/pepper/ppb_video_decoder_impl.h" 5 #include "content/renderer/pepper/ppb_video_decoder_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "content/renderer/media/pepper_platform_video_decoder.h" 12 #include "content/renderer/media/pepper_platform_video_decoder.h"
13 #include "content/renderer/pepper/common.h" 13 #include "content/renderer/pepper/common.h"
14 #include "content/renderer/pepper/pepper_helper_impl.h"
14 #include "content/renderer/pepper/pepper_platform_context_3d.h" 15 #include "content/renderer/pepper/pepper_platform_context_3d.h"
15 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
16 #include "content/renderer/pepper/plugin_module.h" 16 #include "content/renderer/pepper/plugin_module.h"
17 #include "content/renderer/pepper/ppb_buffer_impl.h" 17 #include "content/renderer/pepper/ppb_buffer_impl.h"
18 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" 18 #include "content/renderer/pepper/ppb_graphics_3d_impl.h"
19 #include "content/renderer/pepper/resource_helper.h" 19 #include "content/renderer/pepper/resource_helper.h"
20 #include "gpu/command_buffer/client/gles2_implementation.h" 20 #include "gpu/command_buffer/client/gles2_implementation.h"
21 #include "media/video/picture.h" 21 #include "media/video/picture.h"
22 #include "media/video/video_decode_accelerator.h" 22 #include "media/video/video_decode_accelerator.h"
23 #include "ppapi/c/dev/pp_video_dev.h" 23 #include "ppapi/c/dev/pp_video_dev.h"
24 #include "ppapi/c/dev/ppb_video_decoder_dev.h" 24 #include "ppapi/c/dev/ppb_video_decoder_dev.h"
25 #include "ppapi/c/dev/ppp_video_decoder_dev.h" 25 #include "ppapi/c/dev/ppp_video_decoder_dev.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 PP_Resource graphics_context, 132 PP_Resource graphics_context,
133 PlatformContext3D* context, 133 PlatformContext3D* context,
134 gpu::gles2::GLES2Implementation* gles2_impl, 134 gpu::gles2::GLES2Implementation* gles2_impl,
135 PP_VideoDecoder_Profile profile) { 135 PP_VideoDecoder_Profile profile) {
136 InitCommon(graphics_context, gles2_impl); 136 InitCommon(graphics_context, gles2_impl);
137 137
138 int command_buffer_route_id = context->GetCommandBufferRouteId(); 138 int command_buffer_route_id = context->GetCommandBufferRouteId();
139 if (command_buffer_route_id == 0) 139 if (command_buffer_route_id == 0)
140 return false; 140 return false;
141 141
142 PepperPluginDelegateImpl* plugin_delegate =
143 ResourceHelper::GetPluginDelegate(this);
144 if (!plugin_delegate)
145 return false;
146
147 platform_video_decoder_.reset(new PlatformVideoDecoder( 142 platform_video_decoder_.reset(new PlatformVideoDecoder(
148 this, command_buffer_route_id)); 143 this, command_buffer_route_id));
149 if (!platform_video_decoder_) 144 if (!platform_video_decoder_)
150 return false; 145 return false;
151 146
152 FlushCommandBuffer(); 147 FlushCommandBuffer();
153 return platform_video_decoder_->Initialize(PPToMediaProfile(profile)); 148 return platform_video_decoder_->Initialize(PPToMediaProfile(profile));
154 } 149 }
155 150
156 int32_t PPB_VideoDecoder_Impl::Decode( 151 int32_t PPB_VideoDecoder_Impl::Decode(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 291
297 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 292 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
298 RunFlushCallback(PP_OK); 293 RunFlushCallback(PP_OK);
299 } 294 }
300 295
301 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { 296 void PPB_VideoDecoder_Impl::NotifyInitializeDone() {
302 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; 297 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!";
303 } 298 }
304 299
305 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_tcp_socket_private_impl.cc ('k') | content/renderer/pepper/renderer_ppapi_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698