Chromium Code Reviews| Index: remoting/client/plugin/pepper_desktop_frame.h |
| diff --git a/remoting/client/plugin/pepper_desktop_frame.h b/remoting/client/plugin/pepper_desktop_frame.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3896bf90e58eb72df748f7f80cee625a2356209b |
| --- /dev/null |
| +++ b/remoting/client/plugin/pepper_desktop_frame.h |
| @@ -0,0 +1,45 @@ |
| +#ifndef REMOTING_CLIENT_PLUGIN_PEPPER_IMAGE_BUFFER_H_ |
|
Wez
2013/07/03 20:01:24
New files need copyright notice.
|
| +#define REMOTING_CLIENT_PLUGIN_PEPPER_IMAGE_BUFFER_H_ |
| + |
| +#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| + |
| +#ifdef DISALLOW_COPY_AND_ASSIGN |
| +#undef DISALLOW_COPY_AND_ASSIGN |
| +#endif |
| + |
| +#ifdef DISALLOW_IMPLICIT_CONSTRUCTORS |
| +#undef DISALLOW_IMPLICIT_CONSTRUCTORS |
| +#endif |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "ppapi/cpp/image_data.h" |
| + |
| +namespace remoting { |
| + |
| +// ImageBuffer that uses PPAPI to allocate space for a raw image. |
| +class PepperDesktopFrame : public webrtc::DesktopFrame { |
|
Wez
2013/07/03 20:01:24
Do you really need a class this complex? Can't yo
|
| + public: |
| + static PepperDesktopFrame* Create(const pp::InstanceHandle& instance, |
| + int width, |
| + int height); |
| + |
| + // Constructor. |
| + PepperDesktopFrame(pp::Size* size, |
|
Wez
2013/07/03 20:01:24
Why pass these by reference?
|
| + pp::ImageData* buffer, |
|
Wez
2013/07/03 20:01:24
When passing objects by reference, use scoped_ptr<
|
| + webrtc::DesktopSize* desktop_size); |
| + |
| + // Destructor. |
| + ~PepperDesktopFrame(); |
| + |
| + // Access to pepper stuff. |
| + pp::ImageData& data_object(); |
| + |
| + private: |
| + scoped_ptr<pp::Size> size_; |
| + scoped_ptr<pp::ImageData> buffer_; |
| + scoped_ptr<webrtc::DesktopSize> desktop_size_; |
| +}; |
| + |
| +} // namespace remoting |
| + |
| +#endif |