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

Side by Side Diff: ppapi/shared_impl/video_decoder_impl.h

Issue 7608033: Move the refcounting from the proxy/impl resource object to the shared resource object base class. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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
« no previous file with comments | « ppapi/shared_impl/resource_object_base.h ('k') | ppapi/shared_impl/video_decoder_impl.cc » ('j') | 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 #ifndef PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_ 5 #ifndef PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_
6 #define PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_ 6 #define PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 namespace ppapi { 23 namespace ppapi {
24 namespace thunk { 24 namespace thunk {
25 class PPB_Context3D_API; 25 class PPB_Context3D_API;
26 } // namespace thunk 26 } // namespace thunk
27 } // namespace ppapi 27 } // namespace ppapi
28 28
29 namespace ppapi { 29 namespace ppapi {
30 30
31 // Implements the logic to set and run callbacks for various video decoder 31 // Implements the logic to set and run callbacks for various video decoder
32 // events. Both the proxy and the renderer implementation share this code. 32 // events. Both the proxy and the renderer implementation share this code.
33 class VideoDecoderImpl : public ResourceObjectBase, 33 class VideoDecoderImpl : public thunk::PPB_VideoDecoder_API {
34 public thunk::PPB_VideoDecoder_API {
35 public: 34 public:
36 VideoDecoderImpl(); 35 VideoDecoderImpl();
37 virtual ~VideoDecoderImpl(); 36 virtual ~VideoDecoderImpl();
38 37
39 // ResourceObjectBase implementation.
40 virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE;
41
42 // PPB_VideoDecoder_API implementation. 38 // PPB_VideoDecoder_API implementation.
43 virtual void Destroy() OVERRIDE; 39 virtual void Destroy() OVERRIDE;
44 40
45 // Copy C-style config list into |out_configs| vector. 41 // Copy C-style config list into |out_configs| vector.
46 static bool CopyConfigsToVector( 42 static bool CopyConfigsToVector(
47 const PP_VideoConfigElement* configs_to_copy, 43 const PP_VideoConfigElement* configs_to_copy,
48 std::vector<PP_VideoConfigElement>* out_configs); 44 std::vector<PP_VideoConfigElement>* out_configs);
49 45
50 protected: 46 protected:
51 void SetFlushCallback(PP_CompletionCallback callback); 47 void SetFlushCallback(PP_CompletionCallback callback);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // In the out-of-process case, Context3D's gles2_impl() exists in the plugin 84 // In the out-of-process case, Context3D's gles2_impl() exists in the plugin
89 // process only, so gles2_impl_ is NULL in that case. 85 // process only, so gles2_impl_ is NULL in that case.
90 gpu::gles2::GLES2Implementation* gles2_impl_; 86 gpu::gles2::GLES2Implementation* gles2_impl_;
91 87
92 DISALLOW_COPY_AND_ASSIGN(VideoDecoderImpl); 88 DISALLOW_COPY_AND_ASSIGN(VideoDecoderImpl);
93 }; 89 };
94 90
95 } // namespace ppapi 91 } // namespace ppapi
96 92
97 #endif // PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_ 93 #endif // PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/resource_object_base.h ('k') | ppapi/shared_impl/video_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698