blob: 59460f17e2279043a45d6a445167de496daa77ab [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;
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 .
27class 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]a04494cb2012-07-23 05:00:3234 virtual void OnConnectionReady(bool ready) = 0;
[email protected]cb68c022012-07-23 02:41:3135
[email protected]a5d181f2013-04-19 14:55:3736 // 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]cb68c022012-07-23 02:41:3140 // 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]34e25582013-04-06 05:01:0245
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]cb68c022012-07-23 02:41:3150};
51
52} // namespace remoting
53
54#endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_