Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: webrtc/modules/desktop_capture/window_capturer.h

Issue 2452263003: Add DesktopCapturer GetSourceList SelectSource FocusOnSelectedSource functions (Closed)
Patch Set: Fix build break on Chromium Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/modules/desktop_capture/desktop_capture_types.h" 18 #include "webrtc/modules/desktop_capture/desktop_capture_types.h"
19 #include "webrtc/modules/desktop_capture/desktop_capturer.h" 19 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
20 #include "webrtc/typedefs.h" 20 #include "webrtc/typedefs.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 class DesktopCaptureOptions; 24 class DesktopCaptureOptions;
25 25
26 // TODO(zijiehe): Remove this class.
26 class WindowCapturer : public DesktopCapturer { 27 class WindowCapturer : public DesktopCapturer {
27 public: 28 public:
28 typedef webrtc::WindowId WindowId; 29 typedef webrtc::WindowId WindowId;
29 30
30 struct Window { 31 struct Window {
31 WindowId id; 32 WindowId id;
32 33
33 // Title of the window in UTF-8 encoding. 34 // Title of the window in UTF-8 encoding.
34 std::string title; 35 std::string title;
35 }; 36 };
36 37
37 typedef std::vector<Window> WindowList; 38 typedef std::vector<Window> WindowList;
38 39
40 // Consumers should use DesktopCapturer::CreateWindowCapturer.
39 static WindowCapturer* Create(const DesktopCaptureOptions& options); 41 static WindowCapturer* Create(const DesktopCaptureOptions& options);
40 42
41 ~WindowCapturer() override {} 43 ~WindowCapturer() override;
42 44
45 // Deprecated, use GetSourceList().
43 // Get list of windows. Returns false in case of a failure. 46 // Get list of windows. Returns false in case of a failure.
44 virtual bool GetWindowList(WindowList* windows) = 0; 47 virtual bool GetWindowList(WindowList* windows);
45 48
49 // Deprecated, use SelectSource().
46 // Select window to be captured. Returns false in case of a failure (e.g. if 50 // Select window to be captured. Returns false in case of a failure (e.g. if
47 // there is no window with the specified id). 51 // there is no window with the specified id).
48 virtual bool SelectWindow(WindowId id) = 0; 52 virtual bool SelectWindow(WindowId id);
49 53
54 // Deprecated, use FocusOnSelectedSource().
50 // Bring the selected window to the front. Returns false in case of a 55 // Bring the selected window to the front. Returns false in case of a
51 // failure or no window selected. 56 // failure or no window selected.
52 virtual bool BringSelectedWindowToFront() = 0; 57 virtual bool BringSelectedWindowToFront();
58
59 // DesktopCapturer interfaces.
60 bool GetSourceList(SourceList* sources) override;
61 bool SelectSource(SourceId id) override;
62 bool FocusOnSelectedSource() override;
53 }; 63 };
54 64
55 } // namespace webrtc 65 } // namespace webrtc
56 66
57 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_ 67 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_CAPTURER_H_
58 68
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/screen_capturer.cc ('k') | webrtc/modules/desktop_capture/window_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698