| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
| 6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "remoting/host/desktop_environment.h" |
| 12 |
| 13 namespace base { |
| 14 class SingleThreadTaskRunner; |
| 15 } // base |
| 16 |
| 17 namespace remoting { |
| 18 |
| 19 class ClientSession; |
| 20 class DesktopSessionConnector; |
| 21 |
| 22 // A variant of desktop environment integrating with the desktop by means of |
| 23 // a helper process and talking to that process via IPC. |
| 24 class IpcDesktopEnvironment : public DesktopEnvironment { |
| 25 public: |
| 26 // |desktop_session_connector| is used to bind the IpcDesktopEnvironment to |
| 27 // a desktop session, to be notified with a new IPC channel every time |
| 28 // the desktop process is changed. |desktop_session_connector| must outlive |
| 29 // |this|. |client| specifies the client session owning |this|. |
| 30 IpcDesktopEnvironment( |
| 31 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 32 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 33 DesktopSessionConnector* desktop_session_connector, |
| 34 ClientSession* client); |
| 35 virtual ~IpcDesktopEnvironment(); |
| 36 |
| 37 virtual void Start( |
| 38 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE; |
| 39 |
| 40 // Disconnects the client session that owns |this|. |
| 41 void DisconnectClient(); |
| 42 |
| 43 private: |
| 44 DesktopSessionConnector* desktop_session_connector_; |
| 45 |
| 46 // Specifies the client session that owns |this|. |
| 47 ClientSession* client_; |
| 48 |
| 49 // True if |this| has been connected to a desktop session. |
| 50 bool connected_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment); |
| 53 }; |
| 54 |
| 55 } // namespace remoting |
| 56 |
| 57 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
| OLD | NEW |