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

Side by Side Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.h

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PEPPER_VIDEO_DECODER_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_VIDEO_DECODER_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
7 7
8 #include "base/basictypes.h"
8 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
9 #include "webkit/glue/plugins/pepper_plugin_delegate.h" 10 #include "webkit/plugins/ppapi/plugin_delegate.h"
10 #include "webkit/glue/plugins/pepper_resource.h" 11 #include "webkit/plugins/ppapi/resource.h"
11 12
12 struct PP_VideoDecoderConfig_Dev; 13 struct PP_VideoDecoderConfig_Dev;
13 struct PP_VideoCompressedDataBuffer_Dev; 14 struct PP_VideoCompressedDataBuffer_Dev;
14 struct PP_VideoUncompressedDataBuffer_Dev; 15 struct PP_VideoUncompressedDataBuffer_Dev;
15 struct PPB_VideoDecoder_Dev; 16 struct PPB_VideoDecoder_Dev;
16 17
17 namespace pepper { 18 namespace webkit {
19 namespace ppapi {
18 20
19 class PluginInstance; 21 class PluginInstance;
20 22
21 class VideoDecoder : public Resource { 23 class PPB_VideoDecoder_Impl : public Resource {
22 public: 24 public:
23 VideoDecoder(PluginInstance* instance); 25 PPB_VideoDecoder_Impl(PluginInstance* instance);
24 virtual ~VideoDecoder(); 26 virtual ~PPB_VideoDecoder_Impl();
25 27
26 // Returns a pointer to the interface implementing PPB_VideoDecoder that is 28 // Returns a pointer to the interface implementing PPB_VideoDecoder that is
27 // exposed to the plugin. 29 // exposed to the plugin.
28 static const PPB_VideoDecoder_Dev* GetInterface(); 30 static const PPB_VideoDecoder_Dev* GetInterface();
29 31
30 // Resource overrides. 32 // Resource overrides.
31 virtual VideoDecoder* AsVideoDecoder(); 33 virtual PPB_VideoDecoder_Impl* AsPPB_VideoDecoder_Impl();
32 34
33 PluginInstance* instance() { return instance_.get(); } 35 PluginInstance* instance() { return instance_.get(); }
34 36
35 // PPB_VideoDecoder implementation. 37 // PPB_VideoDecoder implementation.
36 bool Init(const PP_VideoDecoderConfig_Dev& decoder_config); 38 bool Init(const PP_VideoDecoderConfig_Dev& decoder_config);
37 bool Decode(PP_VideoCompressedDataBuffer_Dev& input_buffer); 39 bool Decode(PP_VideoCompressedDataBuffer_Dev& input_buffer);
38 int32_t Flush(PP_CompletionCallback& callback); 40 int32_t Flush(PP_CompletionCallback& callback);
39 bool ReturnUncompressedDataBuffer(PP_VideoUncompressedDataBuffer_Dev& buffer); 41 bool ReturnUncompressedDataBuffer(PP_VideoUncompressedDataBuffer_Dev& buffer);
40 42
41 private: 43 private:
42 // This is NULL before initialization, and if this VideoDecoder is 44 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is
43 // swapped with another. 45 // swapped with another.
44 scoped_ptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_; 46 scoped_ptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_;
45 scoped_refptr<PluginInstance> instance_; 47 scoped_refptr<PluginInstance> instance_;
48
49 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl);
46 }; 50 };
47 51
48 } // namespace pepper 52 } // namespace ppapi
53 } // namespace webkit
49 54
50 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_VIDEO_DECODER_H_ 55 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_url_util_impl.cc ('k') | webkit/plugins/ppapi/ppb_video_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698