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

Side by Side 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, 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« 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