Add explicit |forceOnlineSignin| to user pod status
[chromium-blink-merge.git] / remoting / host / screen_capturer_fake.h
blobfe1660b1eb486f589dcd0f939710f69acb29ec33
1 // Copyright 2013 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_HOST_SCREEN_CAPTURER_FAKE_H_
6 #define REMOTING_HOST_SCREEN_CAPTURER_FAKE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "media/base/media_export.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
11 #include "third_party/webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
12 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
14 namespace remoting {
16 // A ScreenCapturerFake generates artificial image for testing purpose.
18 // ScreenCapturerFake is double-buffered as required by ScreenCapturer.
19 class ScreenCapturerFake : public webrtc::ScreenCapturer {
20 public:
21 // ScreenCapturerFake generates a picture of size kWidth x kHeight.
22 static const int kWidth = 800;
23 static const int kHeight = 600;
25 ScreenCapturerFake();
26 virtual ~ScreenCapturerFake();
28 // webrtc::DesktopCapturer interface.
29 virtual void Start(Callback* callback) OVERRIDE;
30 virtual void Capture(const webrtc::DesktopRegion& rect) OVERRIDE;
32 // ScreenCapturer interface.
33 virtual void SetMouseShapeObserver(
34 MouseShapeObserver* mouse_shape_observer) OVERRIDE;
35 virtual bool GetScreenList(ScreenList* screens) OVERRIDE;
36 virtual bool SelectScreen(webrtc::ScreenId id) OVERRIDE;
38 private:
39 // Generates an image in the front buffer.
40 void GenerateImage();
42 // Called when the screen configuration is changed.
43 void ScreenConfigurationChanged();
45 Callback* callback_;
46 MouseShapeObserver* mouse_shape_observer_;
48 webrtc::DesktopSize size_;
49 int bytes_per_row_;
50 int box_pos_x_;
51 int box_pos_y_;
52 int box_speed_x_;
53 int box_speed_y_;
55 webrtc::ScreenCaptureFrameQueue queue_;
57 DISALLOW_COPY_AND_ASSIGN(ScreenCapturerFake);
60 } // namespace remoting
62 #endif // REMOTING_HOST_SCREEN_CAPTURER_FAKE_H_