[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; | ||||
sergeyu | 06fa7c5 | 2015-12-17 18:17:03 | [diff] [blame] | 20 | class ExtensionMessage; |
[email protected] | 8835692 | 2013-06-04 06:26:01 | [diff] [blame] | 21 | class PairingResponse; |
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 22 | } // namespace protocol |
23 | |||||
24 | // ClientUserInterface is an interface that must be implemented by | ||||
25 | // applications embedding the Chromoting client, to provide client's user | ||||
26 | // interface. | ||||
27 | // | ||||
28 | // TODO(sergeyu): Cleanup this interface, see crbug.com/138108 . | ||||
29 | class ClientUserInterface { | ||||
30 | public: | ||||
31 | virtual ~ClientUserInterface() {} | ||||
32 | |||||
33 | // Record the update the state of the connection, updating the UI as needed. | ||||
34 | virtual void OnConnectionState(protocol::ConnectionToHost::State state, | ||||
35 | protocol::ErrorCode error) = 0; | ||||
[email protected] | a04494cb | 2012-07-23 05:00:32 | [diff] [blame] | 36 | virtual void OnConnectionReady(bool ready) = 0; |
[email protected] | a7e0f34e | 2014-01-09 19:10:23 | [diff] [blame] | 37 | virtual void OnRouteChanged(const std::string& channel_name, |
38 | const protocol::TransportRoute& route) = 0; | ||||
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 39 | |
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 40 | // Passes the final set of capabilities negotiated between the client and host |
41 | // to the application. | ||||
42 | virtual void SetCapabilities(const std::string& capabilities) = 0; | ||||
43 | |||||
[email protected] | 8835692 | 2013-06-04 06:26:01 | [diff] [blame] | 44 | // Passes a pairing response message to the client. |
45 | virtual void SetPairingResponse( | ||||
46 | const protocol::PairingResponse& pairing_response) = 0; | ||||
47 | |||||
[email protected] | 09eabd65c | 2013-08-13 00:13:48 | [diff] [blame] | 48 | // Deliver an extension message from the host to the client. |
49 | virtual void DeliverHostMessage( | ||||
50 | const protocol::ExtensionMessage& message) = 0; | ||||
51 | |||||
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 52 | // Get the view's ClipboardStub implementation. |
53 | virtual protocol::ClipboardStub* GetClipboardStub() = 0; | ||||
54 | |||||
55 | // Get the view's CursorShapeStub implementation. | ||||
56 | virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0; | ||||
[email protected] | cb68c02 | 2012-07-23 02:41:31 | [diff] [blame] | 57 | }; |
58 | |||||
59 | } // namespace remoting | ||||
60 | |||||
61 | #endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ |