blob: e95cad8e6167b472fbad354794dae553d1c70220 [file] [log] [blame]
sergeyu@chromium.orgb10ccbe2013-05-19 07:02:48 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "webrtc/modules/desktop_capture/window_capturer.h"
12
pbos@webrtc.org12dc1a32013-08-05 16:22:53 +000013#include <assert.h>
sergeyu@chromium.orgb10ccbe2013-05-19 07:02:48 +000014
15#include "webrtc/modules/desktop_capture/desktop_frame.h"
16
17namespace webrtc {
18
19namespace {
20
21class WindowCapturerLinux : public WindowCapturer {
22 public:
23 WindowCapturerLinux();
24 virtual ~WindowCapturerLinux();
25
26 // WindowCapturer interface.
27 virtual bool GetWindowList(WindowList* windows) OVERRIDE;
28 virtual bool SelectWindow(WindowId id) OVERRIDE;
29
30 // DesktopCapturer interface.
31 virtual void Start(Callback* callback) OVERRIDE;
32 virtual void Capture(const DesktopRegion& region) OVERRIDE;
33
34 private:
35 Callback* callback_;
36
37 DISALLOW_COPY_AND_ASSIGN(WindowCapturerLinux);
38};
39
40WindowCapturerLinux::WindowCapturerLinux()
41 : callback_(NULL) {
42}
43
44WindowCapturerLinux::~WindowCapturerLinux() {
45}
46
47bool WindowCapturerLinux::GetWindowList(WindowList* windows) {
48 // Not implemented yet.
49 return false;
50}
51
52bool WindowCapturerLinux::SelectWindow(WindowId id) {
53 // Not implemented yet.
54 return false;
55}
56
57void WindowCapturerLinux::Start(Callback* callback) {
58 assert(!callback_);
59 assert(callback);
60
61 callback_ = callback;
62}
63
64void WindowCapturerLinux::Capture(const DesktopRegion& region) {
65 // Not implemented yet.
66 callback_->OnCaptureCompleted(NULL);
67}
68
69} // namespace
70
71// static
72WindowCapturer* WindowCapturer::Create() {
73 return new WindowCapturerLinux();
74}
75
76} // namespace webrtc