OLD | NEW |
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_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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "remoting/base/scoped_thread_proxy.h" | 14 #include "remoting/base/scoped_thread_proxy.h" |
15 | 15 |
16 namespace remoting { | 16 namespace remoting { |
17 | 17 |
18 class Capturer; | 18 class Capturer; |
19 class ChromotingHost; | 19 class ChromotingHost; |
20 class ChromotingHostContext; | 20 class ChromotingHostContext; |
21 | 21 |
22 namespace protocol { | 22 namespace protocol { |
23 class HostEventStub; | 23 class HostEventStub; |
24 }; | 24 }; |
25 | 25 |
26 class DesktopEnvironment { | 26 class DesktopEnvironment { |
27 public: | 27 public: |
28 static scoped_ptr<DesktopEnvironment> Create(ChromotingHostContext* context); | 28 // Creates a DesktopEnvironment used in a host plugin. |
| 29 static scoped_ptr<DesktopEnvironment> Create( |
| 30 ChromotingHostContext* context); |
| 31 |
| 32 // Creates a DesktopEnvironment used in a service process. |
| 33 static scoped_ptr<DesktopEnvironment> CreateForService( |
| 34 ChromotingHostContext* context); |
| 35 |
29 static scoped_ptr<DesktopEnvironment> CreateFake( | 36 static scoped_ptr<DesktopEnvironment> CreateFake( |
30 ChromotingHostContext* context, | 37 ChromotingHostContext* context, |
31 scoped_ptr<Capturer> capturer, | 38 scoped_ptr<Capturer> capturer, |
32 scoped_ptr<protocol::HostEventStub> event_executor); | 39 scoped_ptr<protocol::HostEventStub> event_executor); |
33 | 40 |
34 virtual ~DesktopEnvironment(); | 41 virtual ~DesktopEnvironment(); |
35 | 42 |
36 void set_host(ChromotingHost* host) { host_ = host; } | 43 void set_host(ChromotingHost* host) { host_ = host; } |
37 | 44 |
38 Capturer* capturer() const { return capturer_.get(); } | 45 Capturer* capturer() const { return capturer_.get(); } |
(...skipping 18 matching lines...) Expand all Loading... |
57 | 64 |
58 // Executes input and clipboard events received from the client. | 65 // Executes input and clipboard events received from the client. |
59 scoped_ptr<protocol::HostEventStub> event_executor_; | 66 scoped_ptr<protocol::HostEventStub> event_executor_; |
60 | 67 |
61 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); | 68 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); |
62 }; | 69 }; |
63 | 70 |
64 } // namespace remoting | 71 } // namespace remoting |
65 | 72 |
66 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 73 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |