blob: 59ad3ef88a24e0fe258352fdafe147b6d55a3d5b [file] [log] [blame]
[email protected]cb68c022012-07-23 02:41:311// 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]a5d181f2013-04-19 14:55:378#include <string>
9
[email protected]cb68c022012-07-23 02:41:3110#include "base/basictypes.h"
[email protected]a5d181f2013-04-19 14:55:3711#include "base/memory/scoped_ptr.h"
[email protected]cb68c022012-07-23 02:41:3112#include "remoting/protocol/connection_to_host.h"
[email protected]34e25582013-04-06 05:01:0213#include "remoting/protocol/third_party_client_authenticator.h"
[email protected]cb68c022012-07-23 02:41:3114
15namespace remoting {
16
17namespace protocol {
18class ClipboardStub;
19class CursorShapeStub;
sergeyu06fa7c52015-12-17 18:17:0320class ExtensionMessage;
[email protected]88356922013-06-04 06:26:0121class PairingResponse;
[email protected]cb68c022012-07-23 02:41:3122} // 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 .
29class 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]a04494cb2012-07-23 05:00:3236 virtual void OnConnectionReady(bool ready) = 0;
[email protected]a7e0f34e2014-01-09 19:10:2337 virtual void OnRouteChanged(const std::string& channel_name,
38 const protocol::TransportRoute& route) = 0;
[email protected]cb68c022012-07-23 02:41:3139
[email protected]a5d181f2013-04-19 14:55:3740 // 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]88356922013-06-04 06:26:0144 // Passes a pairing response message to the client.
45 virtual void SetPairingResponse(
46 const protocol::PairingResponse& pairing_response) = 0;
47
[email protected]09eabd65c2013-08-13 00:13:4848 // Deliver an extension message from the host to the client.
49 virtual void DeliverHostMessage(
50 const protocol::ExtensionMessage& message) = 0;
51
[email protected]cb68c022012-07-23 02:41:3152 // 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]cb68c022012-07-23 02:41:3157};
58
59} // namespace remoting
60
61#endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_