OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 namespace protocol { | |
14 class InputStub; | |
15 } // namespace protocol | |
16 | |
17 class Capturer; | 13 class Capturer; |
18 class Curtain; | 14 class Curtain; |
| 15 class EventExecutor; |
19 | 16 |
20 class DesktopEnvironment { | 17 class DesktopEnvironment { |
21 public: | 18 public: |
22 // DesktopEnvironment takes ownership of all the objects passed the ctor. | 19 // DesktopEnvironment takes ownership of all the objects passed the ctor. |
23 DesktopEnvironment(Capturer* capturer, protocol::InputStub* input_stub, | 20 DesktopEnvironment(Capturer* capturer, EventExecutor* event_executor, |
24 Curtain* curtain); | 21 Curtain* curtain); |
25 virtual ~DesktopEnvironment(); | 22 virtual ~DesktopEnvironment(); |
26 | 23 |
27 Capturer* capturer() const { return capturer_.get(); } | 24 Capturer* capturer() const { return capturer_.get(); } |
28 protocol::InputStub* input_stub() const { return input_stub_.get(); } | 25 EventExecutor* event_executor() const { return event_executor_.get(); } |
29 Curtain* curtain() const { return curtain_.get(); } | 26 Curtain* curtain() const { return curtain_.get(); } |
30 | 27 |
31 private: | 28 private: |
32 // Capturer to be used by ScreenRecorder. | 29 // Capturer to be used by ScreenRecorder. |
33 scoped_ptr<Capturer> capturer_; | 30 scoped_ptr<Capturer> capturer_; |
34 | 31 |
35 // InputStub in the host executes input events received from the client. | 32 // Executes input events received from the client. |
36 scoped_ptr<protocol::InputStub> input_stub_; | 33 scoped_ptr<EventExecutor> event_executor_; |
37 | 34 |
38 // Curtain ensures privacy for the remote user. | 35 // Curtain ensures privacy for the remote user. |
39 scoped_ptr<Curtain> curtain_; | 36 scoped_ptr<Curtain> curtain_; |
40 | 37 |
41 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); | 38 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); |
42 }; | 39 }; |
43 | 40 |
44 } // namespace remoting | 41 } // namespace remoting |
45 | 42 |
46 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 43 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |