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_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // after OnConnectionChannelsConnected(). | 46 // after OnConnectionChannelsConnected(). |
47 virtual void CreateMediaStreams() = 0; | 47 virtual void CreateMediaStreams() = 0; |
48 | 48 |
49 // Called when the network connection is authenticated and all | 49 // Called when the network connection is authenticated and all |
50 // channels are connected. | 50 // channels are connected. |
51 virtual void OnConnectionChannelsConnected() = 0; | 51 virtual void OnConnectionChannelsConnected() = 0; |
52 | 52 |
53 // Called when the network connection is closed or failed. | 53 // Called when the network connection is closed or failed. |
54 virtual void OnConnectionClosed(ErrorCode error) = 0; | 54 virtual void OnConnectionClosed(ErrorCode error) = 0; |
55 | 55 |
56 // Called when a new input event is received. | |
57 virtual void OnInputEventReceived(int64_t timestamp) = 0; | |
58 | |
59 // Called on notification of a route change event, which happens when a | 56 // Called on notification of a route change event, which happens when a |
60 // channel is connected. | 57 // channel is connected. |
61 virtual void OnRouteChange(const std::string& channel_name, | 58 virtual void OnRouteChange(const std::string& channel_name, |
62 const TransportRoute& route) = 0; | 59 const TransportRoute& route) = 0; |
63 | 60 |
64 protected: | 61 protected: |
65 virtual ~EventHandler() {} | 62 virtual ~EventHandler() {} |
66 }; | 63 }; |
67 | 64 |
68 ConnectionToClient() {} | 65 ConnectionToClient() {} |
(...skipping 29 matching lines...) Expand all Loading... |
98 // must be called in EventHandler::OnConnectionAuthenticated(). | 95 // must be called in EventHandler::OnConnectionAuthenticated(). |
99 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; | 96 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; |
100 virtual void set_host_stub(HostStub* host_stub) = 0; | 97 virtual void set_host_stub(HostStub* host_stub) = 0; |
101 virtual void set_input_stub(InputStub* input_stub) = 0; | 98 virtual void set_input_stub(InputStub* input_stub) = 0; |
102 }; | 99 }; |
103 | 100 |
104 } // namespace protocol | 101 } // namespace protocol |
105 } // namespace remoting | 102 } // namespace remoting |
106 | 103 |
107 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 104 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |