| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMOTING_SESSION_H_ | 5 #ifndef REMOTING_CLIENT_CHROMOTING_SESSION_H_ |
| 6 #define REMOTING_CLIENT_CHROMOTING_SESSION_H_ | 6 #define REMOTING_CLIENT_CHROMOTING_SESSION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // Moves the host's cursor to the specified coordinates, optionally with some | 109 // Moves the host's cursor to the specified coordinates, optionally with some |
| 110 // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made. | 110 // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made. |
| 111 void SendMouseEvent(int x, | 111 void SendMouseEvent(int x, |
| 112 int y, | 112 int y, |
| 113 protocol::MouseEvent_MouseButton button, | 113 protocol::MouseEvent_MouseButton button, |
| 114 bool button_down); | 114 bool button_down); |
| 115 void SendMouseWheelEvent(int delta_x, int delta_y); | 115 void SendMouseWheelEvent(int delta_x, int delta_y); |
| 116 | 116 |
| 117 // Sends the provided keyboard scan code to the host. | 117 // Sends the provided keyboard scan code to the host. |
| 118 // TODO(nicholss): sending scan code here is really weird. |
| 119 // Can we fix this up so scan_code != 0 is it's own api endpoint? |
| 118 bool SendKeyEvent(int scan_code, int key_code, bool key_down); | 120 bool SendKeyEvent(int scan_code, int key_code, bool key_down); |
| 119 | 121 |
| 122 // Send utf8 encoded text to the host. |
| 120 void SendTextEvent(const std::string& text); | 123 void SendTextEvent(const std::string& text); |
| 121 | 124 |
| 122 // Sends the provided touch event payload to the host. | 125 // Sends the provided touch event payload to the host. |
| 123 void SendTouchEvent(const protocol::TouchEvent& touch_event); | 126 void SendTouchEvent(const protocol::TouchEvent& touch_event); |
| 124 | 127 |
| 125 // Enables or disables the video channel. May be called from any thread. | 128 // Enables or disables the video channel. May be called from any thread. |
| 126 void EnableVideoChannel(bool enable); | 129 void EnableVideoChannel(bool enable); |
| 127 | 130 |
| 128 void SendClientMessage(const std::string& type, const std::string& data); | 131 void SendClientMessage(const std::string& type, const std::string& data); |
| 129 | 132 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 219 |
| 217 base::WeakPtr<ChromotingSession> weak_ptr_; | 220 base::WeakPtr<ChromotingSession> weak_ptr_; |
| 218 base::WeakPtrFactory<ChromotingSession> weak_factory_; | 221 base::WeakPtrFactory<ChromotingSession> weak_factory_; |
| 219 | 222 |
| 220 DISALLOW_COPY_AND_ASSIGN(ChromotingSession); | 223 DISALLOW_COPY_AND_ASSIGN(ChromotingSession); |
| 221 }; | 224 }; |
| 222 | 225 |
| 223 } // namespace remoting | 226 } // namespace remoting |
| 224 | 227 |
| 225 #endif // REMOTING_CLIENT_CHROMOTING_SESSION_H_ | 228 #endif // REMOTING_CLIENT_CHROMOTING_SESSION_H_ |
| OLD | NEW |