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

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

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browsertest 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/host_globals.h"
14 #include "content/renderer/pepper/pepper_helper_impl.h" 15 #include "content/renderer/pepper/pepper_helper_impl.h"
15 #include "content/renderer/pepper/pepper_platform_context_3d.h" 16 #include "content/renderer/pepper/pepper_platform_context_3d.h"
17 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
16 #include "content/renderer/pepper/plugin_module.h" 18 #include "content/renderer/pepper/plugin_module.h"
17 #include "content/renderer/pepper/ppb_buffer_impl.h" 19 #include "content/renderer/pepper/ppb_buffer_impl.h"
18 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" 20 #include "content/renderer/pepper/ppb_graphics_3d_impl.h"
19 #include "content/renderer/pepper/resource_helper.h"
20 #include "gpu/command_buffer/client/gles2_implementation.h" 21 #include "gpu/command_buffer/client/gles2_implementation.h"
21 #include "media/video/picture.h" 22 #include "media/video/picture.h"
22 #include "media/video/video_decode_accelerator.h" 23 #include "media/video/video_decode_accelerator.h"
23 #include "ppapi/c/dev/pp_video_dev.h" 24 #include "ppapi/c/dev/pp_video_dev.h"
24 #include "ppapi/c/dev/ppb_video_decoder_dev.h" 25 #include "ppapi/c/dev/ppb_video_decoder_dev.h"
25 #include "ppapi/c/dev/ppp_video_decoder_dev.h" 26 #include "ppapi/c/dev/ppp_video_decoder_dev.h"
26 #include "ppapi/c/pp_completion_callback.h" 27 #include "ppapi/c/pp_completion_callback.h"
27 #include "ppapi/c/pp_errors.h" 28 #include "ppapi/c/pp_errors.h"
28 #include "ppapi/shared_impl/resource_tracker.h" 29 #include "ppapi/shared_impl/resource_tracker.h"
29 #include "ppapi/thunk/enter.h" 30 #include "ppapi/thunk/enter.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 92 }
92 } 93 }
93 94
94 } // namespace 95 } // namespace
95 96
96 namespace content { 97 namespace content {
97 98
98 PPB_VideoDecoder_Impl::PPB_VideoDecoder_Impl(PP_Instance instance) 99 PPB_VideoDecoder_Impl::PPB_VideoDecoder_Impl(PP_Instance instance)
99 : PPB_VideoDecoder_Shared(instance), 100 : PPB_VideoDecoder_Shared(instance),
100 ppp_videodecoder_(NULL) { 101 ppp_videodecoder_(NULL) {
101 PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); 102 PluginModule* plugin_module =
103 HostGlobals::Get()->GetInstance(pp_instance())->module();
102 if (plugin_module) { 104 if (plugin_module) {
103 ppp_videodecoder_ = static_cast<const PPP_VideoDecoder_Dev*>( 105 ppp_videodecoder_ = static_cast<const PPP_VideoDecoder_Dev*>(
104 plugin_module->GetPluginInterface(PPP_VIDEODECODER_DEV_INTERFACE)); 106 plugin_module->GetPluginInterface(PPP_VIDEODECODER_DEV_INTERFACE));
105 } 107 }
106 } 108 }
107 109
108 PPB_VideoDecoder_Impl::~PPB_VideoDecoder_Impl() { 110 PPB_VideoDecoder_Impl::~PPB_VideoDecoder_Impl() {
109 Destroy(); 111 Destroy();
110 } 112 }
111 113
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 293
292 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 294 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
293 RunFlushCallback(PP_OK); 295 RunFlushCallback(PP_OK);
294 } 296 }
295 297
296 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { 298 void PPB_VideoDecoder_Impl::NotifyInitializeDone() {
297 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; 299 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!";
298 } 300 }
299 301
300 } // namespace content 302 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_tcp_socket_private_impl.cc ('k') | content/renderer/pepper/ppb_widget_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698