[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 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_CLIENT_CLIENT_USER_INTERFACE_H_ | ||||
6 | #define REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ | ||||
7 | |||||
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 8 | #include <string> |
9 | |||||
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 10 | #include "base/basictypes.h" |
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 11 | #include "base/memory/scoped_ptr.h" |
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 12 | #include "remoting/protocol/connection_to_host.h" |
[email protected] | 34e2558 | 2013-04-06 05:01:02 | [diff] [blame] | 13 | #include "remoting/protocol/third_party_client_authenticator.h" |
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 14 | |
15 | namespace remoting { | ||||
16 | |||||
17 | namespace protocol { | ||||
18 | class ClipboardStub; | ||||
19 | class CursorShapeStub; | ||||
20 | } // namespace protocol | ||||
21 | |||||
22 | // ClientUserInterface is an interface that must be implemented by | ||||
23 | // applications embedding the Chromoting client, to provide client's user | ||||
24 | // interface. | ||||
25 | // | ||||
26 | // TODO(sergeyu): Cleanup this interface, see crbug.com/138108 . | ||||
27 | class ClientUserInterface { | ||||
28 | public: | ||||
29 | virtual ~ClientUserInterface() {} | ||||
30 | |||||
31 | // Record the update the state of the connection, updating the UI as needed. | ||||
32 | virtual void OnConnectionState(protocol::ConnectionToHost::State state, | ||||
33 | protocol::ErrorCode error) = 0; | ||||
[email protected] | a04494cb | 2012-07-23 05:00:32 | [diff] [blame] | 34 | virtual void OnConnectionReady(bool ready) = 0; |
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 35 | |
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 36 | // Passes the final set of capabilities negotiated between the client and host |
37 | // to the application. | ||||
38 | virtual void SetCapabilities(const std::string& capabilities) = 0; | ||||
39 | |||||
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 40 | // Get the view's ClipboardStub implementation. |
41 | virtual protocol::ClipboardStub* GetClipboardStub() = 0; | ||||
42 | |||||
43 | // Get the view's CursorShapeStub implementation. | ||||
44 | virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0; | ||||
[email protected] | 34e2558 | 2013-04-06 05:01:02 | [diff] [blame] | 45 | |
46 | // Get the view's TokenFetcher implementation. | ||||
47 | // The TokenFetcher implementation may require interactive authentication. | ||||
48 | virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> | ||||
49 | GetTokenFetcher(const std::string& host_public_key) = 0; | ||||
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 50 | }; |
51 | |||||
52 | } // namespace remoting | ||||
53 | |||||
54 | #endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ |