Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / remoting / client / client_user_interface.h
blob646c7c8ba26fb3abfb74ea70225178e74eb1153a
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.
5 #ifndef REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_
6 #define REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_
8 #include "base/basictypes.h"
9 #include "remoting/protocol/connection_to_host.h"
10 #include "remoting/protocol/third_party_client_authenticator.h"
12 namespace remoting {
14 namespace protocol {
15 class ClipboardStub;
16 class CursorShapeStub;
17 } // namespace protocol
19 // ClientUserInterface is an interface that must be implemented by
20 // applications embedding the Chromoting client, to provide client's user
21 // interface.
23 // TODO(sergeyu): Cleanup this interface, see crbug.com/138108 .
24 class ClientUserInterface {
25 public:
26 virtual ~ClientUserInterface() {}
28 // Record the update the state of the connection, updating the UI as needed.
29 virtual void OnConnectionState(protocol::ConnectionToHost::State state,
30 protocol::ErrorCode error) = 0;
31 virtual void OnConnectionReady(bool ready) = 0;
33 // Get the view's ClipboardStub implementation.
34 virtual protocol::ClipboardStub* GetClipboardStub() = 0;
36 // Get the view's CursorShapeStub implementation.
37 virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0;
39 // Get the view's TokenFetcher implementation.
40 // The TokenFetcher implementation may require interactive authentication.
41 virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
42 GetTokenFetcher(const std::string& host_public_key) = 0;
45 } // namespace remoting
47 #endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_