| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ | 5 #ifndef REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ |
| 6 #define REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ | 6 #define REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 9 #include "remoting/protocol/connection_to_host.h" | 12 #include "remoting/protocol/connection_to_host.h" |
| 10 #include "remoting/protocol/third_party_client_authenticator.h" | 13 #include "remoting/protocol/third_party_client_authenticator.h" |
| 11 | 14 |
| 12 namespace remoting { | 15 namespace remoting { |
| 13 | 16 |
| 14 namespace protocol { | 17 namespace protocol { |
| 15 class ClipboardStub; | 18 class ClipboardStub; |
| 16 class CursorShapeStub; | 19 class CursorShapeStub; |
| 17 } // namespace protocol | 20 } // namespace protocol |
| 18 | 21 |
| 19 // ClientUserInterface is an interface that must be implemented by | 22 // ClientUserInterface is an interface that must be implemented by |
| 20 // applications embedding the Chromoting client, to provide client's user | 23 // applications embedding the Chromoting client, to provide client's user |
| 21 // interface. | 24 // interface. |
| 22 // | 25 // |
| 23 // TODO(sergeyu): Cleanup this interface, see crbug.com/138108 . | 26 // TODO(sergeyu): Cleanup this interface, see crbug.com/138108 . |
| 24 class ClientUserInterface { | 27 class ClientUserInterface { |
| 25 public: | 28 public: |
| 26 virtual ~ClientUserInterface() {} | 29 virtual ~ClientUserInterface() {} |
| 27 | 30 |
| 28 // Record the update the state of the connection, updating the UI as needed. | 31 // Record the update the state of the connection, updating the UI as needed. |
| 29 virtual void OnConnectionState(protocol::ConnectionToHost::State state, | 32 virtual void OnConnectionState(protocol::ConnectionToHost::State state, |
| 30 protocol::ErrorCode error) = 0; | 33 protocol::ErrorCode error) = 0; |
| 31 virtual void OnConnectionReady(bool ready) = 0; | 34 virtual void OnConnectionReady(bool ready) = 0; |
| 32 | 35 |
| 36 // 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 |
| 33 // Get the view's ClipboardStub implementation. | 40 // Get the view's ClipboardStub implementation. |
| 34 virtual protocol::ClipboardStub* GetClipboardStub() = 0; | 41 virtual protocol::ClipboardStub* GetClipboardStub() = 0; |
| 35 | 42 |
| 36 // Get the view's CursorShapeStub implementation. | 43 // Get the view's CursorShapeStub implementation. |
| 37 virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0; | 44 virtual protocol::CursorShapeStub* GetCursorShapeStub() = 0; |
| 38 | 45 |
| 39 // Get the view's TokenFetcher implementation. | 46 // Get the view's TokenFetcher implementation. |
| 40 // The TokenFetcher implementation may require interactive authentication. | 47 // The TokenFetcher implementation may require interactive authentication. |
| 41 virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> | 48 virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> |
| 42 GetTokenFetcher(const std::string& host_public_key) = 0; | 49 GetTokenFetcher(const std::string& host_public_key) = 0; |
| 43 }; | 50 }; |
| 44 | 51 |
| 45 } // namespace remoting | 52 } // namespace remoting |
| 46 | 53 |
| 47 #endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ | 54 #endif // REMOTING_CLIENT_CLIENT_USER_INTERFACE_H_ |
| OLD | NEW |