OLD | NEW |
| (Empty) |
1 /* | |
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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_ | |
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_ | |
13 | |
14 #include <string> | |
15 #include <vector> | |
16 | |
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" | |
21 | |
22 namespace webrtc { | |
23 | |
24 class DesktopCaptureOptions; | |
25 | |
26 // TODO(zijiehe): Remove this class. | |
27 class WindowCapturer : public DesktopCapturer { | |
28 public: | |
29 typedef webrtc::WindowId WindowId; | |
30 | |
31 struct Window { | |
32 WindowId id; | |
33 | |
34 // Title of the window in UTF-8 encoding. | |
35 std::string title; | |
36 }; | |
37 | |
38 typedef std::vector<Window> WindowList; | |
39 | |
40 // Consumers should use DesktopCapturer::CreateWindowCapturer. | |
41 static WindowCapturer* Create(const DesktopCaptureOptions& options); | |
42 | |
43 ~WindowCapturer() override; | |
44 | |
45 // Deprecated, use GetSourceList(). | |
46 // Get list of windows. Returns false in case of a failure. | |
47 virtual bool GetWindowList(WindowList* windows); | |
48 | |
49 // Deprecated, use SelectSource(). | |
50 // Select window to be captured. Returns false in case of a failure (e.g. if | |
51 // there is no window with the specified id). | |
52 virtual bool SelectWindow(WindowId id); | |
53 | |
54 // Deprecated, use FocusOnSelectedSource(). | |
55 // Bring the selected window to the front. Returns false in case of a | |
56 // failure or no window selected. | |
57 virtual bool BringSelectedWindowToFront(); | |
58 | |
59 // DesktopCapturer interfaces. | |
60 bool GetSourceList(SourceList* sources) override; | |
61 bool SelectSource(SourceId id) override; | |
62 bool FocusOnSelectedSource() override; | |
63 }; | |
64 | |
65 } // namespace webrtc | |
66 | |
67 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_ | |
68 | |
OLD | NEW |