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

Side by Side Diff: remoting/host/basic_desktop_environment.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/host/backoff_timer_unittest.cc ('k') | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/host/desktop_environment.h" 14 #include "remoting/host/desktop_environment.h"
15 15
16 namespace webrtc { 16 namespace webrtc {
17 17
18 class DesktopCaptureOptions; 18 class DesktopCaptureOptions;
19 19
20 } // namespace webrtc 20 } // namespace webrtc
21 21
22 namespace remoting { 22 namespace remoting {
23 23
24 // Used to create audio/video capturers and event executor that work with 24 // Used to create audio/video capturers and event executor that work with
25 // the local console. 25 // the local console.
26 class BasicDesktopEnvironment : public DesktopEnvironment { 26 class BasicDesktopEnvironment : public DesktopEnvironment {
27 public: 27 public:
28 ~BasicDesktopEnvironment() override; 28 ~BasicDesktopEnvironment() override;
29 29
30 // DesktopEnvironment implementation. 30 // DesktopEnvironment implementation.
31 scoped_ptr<AudioCapturer> CreateAudioCapturer() override; 31 std::unique_ptr<AudioCapturer> CreateAudioCapturer() override;
32 scoped_ptr<InputInjector> CreateInputInjector() override; 32 std::unique_ptr<InputInjector> CreateInputInjector() override;
33 scoped_ptr<ScreenControls> CreateScreenControls() override; 33 std::unique_ptr<ScreenControls> CreateScreenControls() override;
34 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override; 34 std::unique_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override;
35 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override; 35 std::unique_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor()
36 override;
36 std::string GetCapabilities() const override; 37 std::string GetCapabilities() const override;
37 void SetCapabilities(const std::string& capabilities) override; 38 void SetCapabilities(const std::string& capabilities) override;
38 39
39 protected: 40 protected:
40 friend class BasicDesktopEnvironmentFactory; 41 friend class BasicDesktopEnvironmentFactory;
41 42
42 BasicDesktopEnvironment( 43 BasicDesktopEnvironment(
43 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 44 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
44 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 45 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
45 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 46 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; 80 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
80 81
81 // Used to run UI code. 82 // Used to run UI code.
82 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 83 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
83 84
84 // Options shared between |DesktopCapturer| and |MouseCursorMonitor|. It 85 // Options shared between |DesktopCapturer| and |MouseCursorMonitor|. It
85 // might contain expensive resources, thus justifying the sharing. 86 // might contain expensive resources, thus justifying the sharing.
86 // Also: it's dynamically allocated to avoid having to bring in 87 // Also: it's dynamically allocated to avoid having to bring in
87 // desktop_capture_options.h which brings in X11 headers which causes hard to 88 // desktop_capture_options.h which brings in X11 headers which causes hard to
88 // find build errors. 89 // find build errors.
89 scoped_ptr<webrtc::DesktopCaptureOptions> desktop_capture_options_; 90 std::unique_ptr<webrtc::DesktopCaptureOptions> desktop_capture_options_;
90 91
91 // True if the touch events capability should be offered. 92 // True if the touch events capability should be offered.
92 const bool supports_touch_events_; 93 const bool supports_touch_events_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment); 95 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment);
95 }; 96 };
96 97
97 // Used to create |BasicDesktopEnvironment| instances. 98 // Used to create |BasicDesktopEnvironment| instances.
98 class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory { 99 class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
99 public: 100 public:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // True if the touch events capability should be offered by the 149 // True if the touch events capability should be offered by the
149 // DesktopEnvironment instances. 150 // DesktopEnvironment instances.
150 bool supports_touch_events_; 151 bool supports_touch_events_;
151 152
152 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory); 153 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory);
153 }; 154 };
154 155
155 } // namespace remoting 156 } // namespace remoting
156 157
157 #endif // REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_ 158 #endif // REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/backoff_timer_unittest.cc ('k') | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698