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

Unified Diff: remoting/client/plugin/pepper_desktop_frame.h

Issue 18233015: Abstract PPAPI's ImageData behind webrtc::DesktopFrame interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to using existing webrtc::DesktopFrame class Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/frame_producer.h ('k') | remoting/client/plugin/pepper_desktop_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « remoting/client/frame_producer.h ('k') | remoting/client/plugin/pepper_desktop_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698