Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / remoting / client / frame_consumer.h
blobf3203561638f9fe56209fe97a4334c0550d5dfeb
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_
6 #define REMOTING_CLIENT_FRAME_CONSUMER_H_
8 #include "base/basictypes.h"
10 namespace webrtc {
11 class DesktopFrame;
12 class DesktopRect;
13 class DesktopRegion;
14 class DesktopSize;
15 class DesktopVector;
16 } // namespace webrtc
18 namespace remoting {
20 class FrameConsumer {
21 public:
22 // List of supported pixel formats needed by various platforms.
23 enum PixelFormat {
24 FORMAT_BGRA, // Used by the Pepper plugin.
25 FORMAT_RGBA, // Used for Android's Bitmap class.
28 virtual scoped_ptr<webrtc::DesktopFrame> AllocateFrame(
29 const webrtc::DesktopSize& size) = 0;
31 virtual void DrawFrame(scoped_ptr<webrtc::DesktopFrame> frame,
32 const base::Closure& done) = 0;
34 // Returns the preferred pixel encoding for the platform.
35 virtual PixelFormat GetPixelFormat() = 0;
37 protected:
38 FrameConsumer() {}
39 virtual ~FrameConsumer() {}
41 private:
42 DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
45 } // namespace remoting
47 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_