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

Side by Side Diff: remoting/protocol/frame_consumer.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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/protocol/fake_video_renderer.cc ('k') | remoting/protocol/host_control_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 REMOTING_PROTOCOL_FRAME_CONSUMER_H_ 5 #ifndef REMOTING_PROTOCOL_FRAME_CONSUMER_H_
6 #define REMOTING_PROTOCOL_FRAME_CONSUMER_H_ 6 #define REMOTING_PROTOCOL_FRAME_CONSUMER_H_
7 7
8 #include <memory>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 12
12 namespace webrtc { 13 namespace webrtc {
13 class DesktopFrame; 14 class DesktopFrame;
14 class DesktopSize; 15 class DesktopSize;
15 } // namespace webrtc 16 } // namespace webrtc
16 17
17 namespace remoting { 18 namespace remoting {
18 namespace protocol { 19 namespace protocol {
19 20
20 class FrameConsumer { 21 class FrameConsumer {
21 public: 22 public:
22 // List of supported pixel formats needed by various platforms. 23 // List of supported pixel formats needed by various platforms.
23 enum PixelFormat { 24 enum PixelFormat {
24 FORMAT_BGRA, // Used by the Pepper plugin. 25 FORMAT_BGRA, // Used by the Pepper plugin.
25 FORMAT_RGBA, // Used for Android's Bitmap class. 26 FORMAT_RGBA, // Used for Android's Bitmap class.
26 }; 27 };
27 28
28 virtual scoped_ptr<webrtc::DesktopFrame> AllocateFrame( 29 virtual std::unique_ptr<webrtc::DesktopFrame> AllocateFrame(
29 const webrtc::DesktopSize& size) = 0; 30 const webrtc::DesktopSize& size) = 0;
30 31
31 virtual void DrawFrame(scoped_ptr<webrtc::DesktopFrame> frame, 32 virtual void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
32 const base::Closure& done) = 0; 33 const base::Closure& done) = 0;
33 34
34 // Returns the preferred pixel encoding for the platform. 35 // Returns the preferred pixel encoding for the platform.
35 virtual PixelFormat GetPixelFormat() = 0; 36 virtual PixelFormat GetPixelFormat() = 0;
36 37
37 protected: 38 protected:
38 FrameConsumer() {} 39 FrameConsumer() {}
39 virtual ~FrameConsumer() {} 40 virtual ~FrameConsumer() {}
40 41
41 private: 42 private:
42 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); 43 DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
43 }; 44 };
44 45
45 } // namespace protocol 46 } // namespace protocol
46 } // namespace remoting 47 } // namespace remoting
47 48
48 #endif // REMOTING_PROTOCOL_FRAME_CONSUMER_H_ 49 #endif // REMOTING_PROTOCOL_FRAME_CONSUMER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/fake_video_renderer.cc ('k') | remoting/protocol/host_control_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698