Remove redundant deinitialization code from HttpCache::Transaction.
[chromium-blink-merge.git] / remoting / client / client_user_interface.h
blob88d3e796991581b435cd447c11ece8d108bc6f11
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 <string>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "remoting/protocol/connection_to_host.h"
13 #include "remoting/protocol/third_party_client_authenticator.h"
15 namespace remoting {
17 namespace protocol {
18 class ClipboardStub;
19 class CursorShapeStub;
20 class PairingResponse;
21 } // namespace protocol
23 // ClientUserInterface is an interface that must be implemented by
24 // applications embedding the Chromoting client, to provide client's user
25 // interface.
27 // TODO(sergeyu): Cleanup this interface, see crbug.com/138108 .
28 class ClientUserInterface {
29 public:
30 virtual ~ClientUserInterface() {}
32 // Record the update the state of the connection, updating the UI as needed.
33 virtual void OnConnectionState(protocol::ConnectionToHost::State state,
34 protocol::ErrorCode error) = 0;
35 virtual void OnConnectionReady(bool ready) = 0;
37 // Passes the final set of capabilities negotiated between the client and host
38 // to the application.
39 virtual void SetCapabilities(const std::string& capabilities) = 0;
41 // Passes a pairing response message to the client.
42 virtual void SetPairingResponse(
43 const protocol::PairingResponse& pairing_response) = 0;
45 // Deliver an extension message from the host to the client.
46 virtual void DeliverHostMessage(
47 const protocol::ExtensionMessage& message) = 0;
49 // Get the view's ClipboardStub implementation.
50 virtual protocol::ClipboardStub* GetClipboardStub() = 0;
52 // Get the view's CursorShapeStub implementation.
53 virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0;
55 // Get the view's TokenFetcher implementation.
56 // The TokenFetcher implementation may require interactive authentication.
57 virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
58 GetTokenFetcher(const std::string& host_public_key) = 0;
61 } // namespace remoting
63 #endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_