Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_IMAGE_BUFFER_H_ | |
|
Wez
2013/07/03 20:01:24
New files need copyright notice.
| |
| 2 #define REMOTING_CLIENT_PLUGIN_PEPPER_IMAGE_BUFFER_H_ | |
| 3 | |
| 4 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | |
| 5 | |
| 6 #ifdef DISALLOW_COPY_AND_ASSIGN | |
| 7 #undef DISALLOW_COPY_AND_ASSIGN | |
| 8 #endif | |
| 9 | |
| 10 #ifdef DISALLOW_IMPLICIT_CONSTRUCTORS | |
| 11 #undef DISALLOW_IMPLICIT_CONSTRUCTORS | |
| 12 #endif | |
| 13 | |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "ppapi/cpp/image_data.h" | |
| 16 | |
| 17 namespace remoting { | |
| 18 | |
| 19 // ImageBuffer that uses PPAPI to allocate space for a raw image. | |
| 20 class PepperDesktopFrame : public webrtc::DesktopFrame { | |
|
Wez
2013/07/03 20:01:24
Do you really need a class this complex? Can't yo
| |
| 21 public: | |
| 22 static PepperDesktopFrame* Create(const pp::InstanceHandle& instance, | |
| 23 int width, | |
| 24 int height); | |
| 25 | |
| 26 // Constructor. | |
| 27 PepperDesktopFrame(pp::Size* size, | |
|
Wez
2013/07/03 20:01:24
Why pass these by reference?
| |
| 28 pp::ImageData* buffer, | |
|
Wez
2013/07/03 20:01:24
When passing objects by reference, use scoped_ptr<
| |
| 29 webrtc::DesktopSize* desktop_size); | |
| 30 | |
| 31 // Destructor. | |
| 32 ~PepperDesktopFrame(); | |
| 33 | |
| 34 // Access to pepper stuff. | |
| 35 pp::ImageData& data_object(); | |
| 36 | |
| 37 private: | |
| 38 scoped_ptr<pp::Size> size_; | |
| 39 scoped_ptr<pp::ImageData> buffer_; | |
| 40 scoped_ptr<webrtc::DesktopSize> desktop_size_; | |
| 41 }; | |
| 42 | |
| 43 } // namespace remoting | |
| 44 | |
| 45 #endif | |
| OLD | NEW |