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

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

Issue 1152733005: Use one scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove from BUILD.gn Created 5 years, 6 months 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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ 10 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_
11 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ 11 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_
12 12
13 #include "webrtc/base/constructormagic.h" 13 #include "webrtc/base/constructormagic.h"
14 #include "webrtc/system_wrappers/interface/scoped_refptr.h" 14 #include "webrtc/base/scoped_ref_ptr.h"
15 15
16 #if defined(USE_X11) 16 #if defined(USE_X11)
17 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" 17 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h"
18 #endif 18 #endif
19 19
20 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 20 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
21 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" 21 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h"
22 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector. h" 22 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector. h"
23 #endif 23 #endif
24 24
25 namespace webrtc { 25 namespace webrtc {
26 26
27 // An object that stores initialization parameters for screen and window 27 // An object that stores initialization parameters for screen and window
28 // capturers. 28 // capturers.
29 class DesktopCaptureOptions { 29 class DesktopCaptureOptions {
30 public: 30 public:
31 // Creates an empty Options instance (e.g. without X display). 31 // Creates an empty Options instance (e.g. without X display).
32 DesktopCaptureOptions(); 32 DesktopCaptureOptions();
33 ~DesktopCaptureOptions(); 33 ~DesktopCaptureOptions();
34 34
35 // Returns instance of DesktopCaptureOptions with default parameters. On Linux 35 // Returns instance of DesktopCaptureOptions with default parameters. On Linux
36 // also initializes X window connection. x_display() will be set to null if 36 // also initializes X window connection. x_display() will be set to null if
37 // X11 connection failed (e.g. DISPLAY isn't set). 37 // X11 connection failed (e.g. DISPLAY isn't set).
38 static DesktopCaptureOptions CreateDefault(); 38 static DesktopCaptureOptions CreateDefault();
39 39
40 #if defined(USE_X11) 40 #if defined(USE_X11)
41 SharedXDisplay* x_display() const { return x_display_; } 41 SharedXDisplay* x_display() const { return x_display_; }
42 void set_x_display(scoped_refptr<SharedXDisplay> x_display) { 42 void set_x_display(rtc::scoped_refptr<SharedXDisplay> x_display) {
43 x_display_ = x_display; 43 x_display_ = x_display;
44 } 44 }
45 #endif 45 #endif
46 46
47 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 47 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
48 DesktopConfigurationMonitor* configuration_monitor() const { 48 DesktopConfigurationMonitor* configuration_monitor() const {
49 return configuration_monitor_; 49 return configuration_monitor_;
50 } 50 }
51 void set_configuration_monitor(scoped_refptr<DesktopConfigurationMonitor> m) { 51 void set_configuration_monitor(
52 rtc::scoped_refptr<DesktopConfigurationMonitor> m) {
52 configuration_monitor_ = m; 53 configuration_monitor_ = m;
53 } 54 }
54 55
55 FullScreenChromeWindowDetector* full_screen_chrome_window_detector() const { 56 FullScreenChromeWindowDetector* full_screen_chrome_window_detector() const {
56 return full_screen_window_detector_; 57 return full_screen_window_detector_;
57 } 58 }
58 void set_full_screen_chrome_window_detector( 59 void set_full_screen_chrome_window_detector(
59 scoped_refptr<FullScreenChromeWindowDetector> detector) { 60 rtc::scoped_refptr<FullScreenChromeWindowDetector> detector) {
60 full_screen_window_detector_ = detector; 61 full_screen_window_detector_ = detector;
61 } 62 }
62 #endif 63 #endif
63 64
64 // Flag indicating that the capturer should use screen change notifications. 65 // Flag indicating that the capturer should use screen change notifications.
65 // Enables/disables use of XDAMAGE in the X11 capturer. 66 // Enables/disables use of XDAMAGE in the X11 capturer.
66 bool use_update_notifications() const { return use_update_notifications_; } 67 bool use_update_notifications() const { return use_update_notifications_; }
67 void set_use_update_notifications(bool use_update_notifications) { 68 void set_use_update_notifications(bool use_update_notifications) {
68 use_update_notifications_ = use_update_notifications; 69 use_update_notifications_ = use_update_notifications;
69 } 70 }
70 71
71 // Flag indicating if desktop effects (e.g. Aero) should be disabled when the 72 // Flag indicating if desktop effects (e.g. Aero) should be disabled when the
72 // capturer is active. Currently used only on Windows. 73 // capturer is active. Currently used only on Windows.
73 bool disable_effects() const { return disable_effects_; } 74 bool disable_effects() const { return disable_effects_; }
74 void set_disable_effects(bool disable_effects) { 75 void set_disable_effects(bool disable_effects) {
75 disable_effects_ = disable_effects; 76 disable_effects_ = disable_effects;
76 } 77 }
77 78
78 #if defined(WEBRTC_WIN) 79 #if defined(WEBRTC_WIN)
79 bool allow_use_magnification_api() const { 80 bool allow_use_magnification_api() const {
80 return allow_use_magnification_api_; 81 return allow_use_magnification_api_;
81 } 82 }
82 void set_allow_use_magnification_api(bool allow) { 83 void set_allow_use_magnification_api(bool allow) {
83 allow_use_magnification_api_ = allow; 84 allow_use_magnification_api_ = allow;
84 } 85 }
85 #endif 86 #endif
86 87
87 private: 88 private:
88 #if defined(USE_X11) 89 #if defined(USE_X11)
89 scoped_refptr<SharedXDisplay> x_display_; 90 rtc::scoped_refptr<SharedXDisplay> x_display_;
90 #endif 91 #endif
91 92
92 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 93 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
93 scoped_refptr<DesktopConfigurationMonitor> configuration_monitor_; 94 rtc::scoped_refptr<DesktopConfigurationMonitor> configuration_monitor_;
94 scoped_refptr<FullScreenChromeWindowDetector> full_screen_window_detector_; 95 rtc::scoped_refptr<FullScreenChromeWindowDetector>
96 full_screen_window_detector_;
95 #endif 97 #endif
96 98
97 #if defined(WEBRTC_WIN) 99 #if defined(WEBRTC_WIN)
98 bool allow_use_magnification_api_; 100 bool allow_use_magnification_api_;
99 #endif 101 #endif
100 bool use_update_notifications_; 102 bool use_update_notifications_;
101 bool disable_effects_; 103 bool disable_effects_;
102 }; 104 };
103 105
104 } // namespace webrtc 106 } // namespace webrtc
105 107
106 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ 108 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/win/audio_device_core_win.cc ('k') | webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698