OLD | NEW |
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 #ifndef PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "ppapi/c/dev/ppb_video_decoder_dev.h" | 13 #include "ppapi/c/dev/ppb_video_decoder_dev.h" |
14 #include "ppapi/shared_impl/resource.h" | 14 #include "ppapi/shared_impl/resource.h" |
15 #include "ppapi/shared_impl/tracked_callback.h" | 15 #include "ppapi/shared_impl/tracked_callback.h" |
16 #include "ppapi/thunk/ppb_video_decoder_api.h" | 16 #include "ppapi/thunk/ppb_video_decoder_dev_api.h" |
17 | 17 |
18 namespace gpu { | 18 namespace gpu { |
19 namespace gles2 { | 19 namespace gles2 { |
20 class GLES2Implementation; | 20 class GLES2Implementation; |
21 } // namespace gles2 | 21 } // namespace gles2 |
22 } // namespace gpu | 22 } // namespace gpu |
23 | 23 |
24 namespace ppapi { | 24 namespace ppapi { |
25 | 25 |
26 // Implements the logic to set and run callbacks for various video decoder | 26 // Implements the logic to set and run callbacks for various video decoder |
27 // events. Both the proxy and the renderer implementation share this code. | 27 // events. Both the proxy and the renderer implementation share this code. |
28 class PPAPI_SHARED_EXPORT PPB_VideoDecoder_Shared | 28 class PPAPI_SHARED_EXPORT PPB_VideoDecoder_Shared |
29 : public Resource, | 29 : public Resource, |
30 NON_EXPORTED_BASE(public thunk::PPB_VideoDecoder_API) { | 30 NON_EXPORTED_BASE(public thunk::PPB_VideoDecoder_Dev_API) { |
31 public: | 31 public: |
32 explicit PPB_VideoDecoder_Shared(PP_Instance instance); | 32 explicit PPB_VideoDecoder_Shared(PP_Instance instance); |
33 explicit PPB_VideoDecoder_Shared(const HostResource& host_resource); | 33 explicit PPB_VideoDecoder_Shared(const HostResource& host_resource); |
34 virtual ~PPB_VideoDecoder_Shared(); | 34 virtual ~PPB_VideoDecoder_Shared(); |
35 | 35 |
36 // Resource overrides. | 36 // Resource overrides. |
37 virtual thunk::PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE; | 37 virtual thunk::PPB_VideoDecoder_Dev_API* AsPPB_VideoDecoder_Dev_API() |
| 38 OVERRIDE; |
38 | 39 |
39 // PPB_VideoDecoder_API implementation. | 40 // PPB_VideoDecoder_Dev_API implementation. |
40 virtual void Destroy() OVERRIDE; | 41 virtual void Destroy() OVERRIDE; |
41 | 42 |
42 protected: | 43 protected: |
43 bool SetFlushCallback(scoped_refptr<TrackedCallback> callback); | 44 bool SetFlushCallback(scoped_refptr<TrackedCallback> callback); |
44 bool SetResetCallback(scoped_refptr<TrackedCallback> callback); | 45 bool SetResetCallback(scoped_refptr<TrackedCallback> callback); |
45 bool SetBitstreamBufferCallback(int32 bitstream_buffer_id, | 46 bool SetBitstreamBufferCallback(int32 bitstream_buffer_id, |
46 scoped_refptr<TrackedCallback> callback); | 47 scoped_refptr<TrackedCallback> callback); |
47 | 48 |
48 void RunFlushCallback(int32 result); | 49 void RunFlushCallback(int32 result); |
49 void RunResetCallback(int32 result); | 50 void RunResetCallback(int32 result); |
(...skipping 24 matching lines...) Expand all Loading... |
74 // In the out-of-process case, Graphics3D's gles2_impl() exists in the plugin | 75 // In the out-of-process case, Graphics3D's gles2_impl() exists in the plugin |
75 // process only, so gles2_impl_ is NULL in that case. | 76 // process only, so gles2_impl_ is NULL in that case. |
76 gpu::gles2::GLES2Implementation* gles2_impl_; | 77 gpu::gles2::GLES2Implementation* gles2_impl_; |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Shared); | 79 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Shared); |
79 }; | 80 }; |
80 | 81 |
81 } // namespace ppapi | 82 } // namespace ppapi |
82 | 83 |
83 #endif // PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ | 84 #endif // PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ |
OLD | NEW |