2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
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.
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_
17 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/modules/desktop_capture/desktop_capture_types.h"
19 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
20 #include "webrtc/typedefs.h"
24 class DesktopCaptureOptions;
26 class WindowCapturer : public DesktopCapturer {
28 typedef webrtc::WindowId WindowId;
33 // Title of the window in UTF-8 encoding.
37 typedef std::vector<Window> WindowList;
39 static WindowCapturer* Create(const DesktopCaptureOptions& options);
41 // TODO(sergeyu): Remove this method. crbug.com/172183
42 static WindowCapturer* Create();
44 virtual ~WindowCapturer() {}
46 // Get list of windows. Returns false in case of a failure.
47 virtual bool GetWindowList(WindowList* windows) = 0;
49 // Select window to be captured. Returns false in case of a failure (e.g. if
50 // there is no window with the specified id).
51 virtual bool SelectWindow(WindowId id) = 0;
53 // Bring the selected window to the front. Returns false in case of a
54 // failure or no window selected.
55 // TODO(jiayl): remove the default impl when FakeWindowCapturer is updated in
57 virtual bool BringSelectedWindowToFront() {
64 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_