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_IPC_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 } // base | 21 } // base |
22 | 22 |
23 namespace IPC { | 23 namespace IPC { |
24 class Sender; | 24 class Sender; |
25 } // namespace IPC | 25 } // namespace IPC |
26 | 26 |
27 namespace remoting { | 27 namespace remoting { |
28 | 28 |
29 class ClientSessionControl; | 29 class ClientSessionControl; |
30 class DesktopSessionProxy; | 30 class DesktopSessionProxy; |
| 31 class GnubbyAuthHandler; |
31 class ScreenResolution; | 32 class ScreenResolution; |
32 | 33 |
33 // A variant of desktop environment integrating with the desktop by means of | 34 // A variant of desktop environment integrating with the desktop by means of |
34 // a helper process and talking to that process via IPC. | 35 // a helper process and talking to that process via IPC. |
35 class IpcDesktopEnvironment : public DesktopEnvironment { | 36 class IpcDesktopEnvironment : public DesktopEnvironment { |
36 public: | 37 public: |
37 // |desktop_session_connector| is used to bind DesktopSessionProxy to | 38 // |desktop_session_connector| is used to bind DesktopSessionProxy to |
38 // a desktop session, to be notified every time the desktop process is | 39 // a desktop session, to be notified every time the desktop process is |
39 // restarted. | 40 // restarted. |
40 IpcDesktopEnvironment( | 41 IpcDesktopEnvironment( |
41 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, | 42 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
42 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 43 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
43 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 44 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
44 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 45 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
45 base::WeakPtr<ClientSessionControl> client_session_control, | 46 base::WeakPtr<ClientSessionControl> client_session_control, |
46 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, | 47 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, |
47 bool virtual_terminal); | 48 bool virtual_terminal); |
48 virtual ~IpcDesktopEnvironment(); | 49 virtual ~IpcDesktopEnvironment(); |
49 | 50 |
50 // DesktopEnvironment implementation. | 51 // DesktopEnvironment implementation. |
51 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; | 52 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; |
52 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; | 53 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; |
53 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; | 54 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; |
54 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; | 55 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; |
55 virtual std::string GetCapabilities() const OVERRIDE; | 56 virtual std::string GetCapabilities() const OVERRIDE; |
56 virtual void SetCapabilities(const std::string& capabilities) OVERRIDE; | 57 virtual void SetCapabilities(const std::string& capabilities) OVERRIDE; |
| 58 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( |
| 59 protocol::ClientStub* client_stub) OVERRIDE; |
57 | 60 |
58 private: | 61 private: |
59 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; | 62 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; |
60 | 63 |
61 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment); | 64 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment); |
62 }; | 65 }; |
63 | 66 |
64 // Used to create IpcDesktopEnvironment objects integrating with the desktop via | 67 // Used to create IpcDesktopEnvironment objects integrating with the desktop via |
65 // a helper process and talking to that process via IPC. | 68 // a helper process and talking to that process via IPC. |
66 class IpcDesktopEnvironmentFactory | 69 class IpcDesktopEnvironmentFactory |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // This gives us more than 67 years of unique IDs assuming a new ID is | 133 // This gives us more than 67 years of unique IDs assuming a new ID is |
131 // allocated every second. | 134 // allocated every second. |
132 int next_id_; | 135 int next_id_; |
133 | 136 |
134 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); | 137 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); |
135 }; | 138 }; |
136 | 139 |
137 } // namespace remoting | 140 } // namespace remoting |
138 | 141 |
139 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ | 142 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |