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_JNI_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // on the UI thread once the user has finished entering this PIN into the UI, | 58 // on the UI thread once the user has finished entering this PIN into the UI, |
59 // but only after the UI has been asked to provide a PIN (via FetchSecret()). | 59 // but only after the UI has been asked to provide a PIN (via FetchSecret()). |
60 void ProvideSecret(const std::string& pin, bool create_pair, | 60 void ProvideSecret(const std::string& pin, bool create_pair, |
61 const std::string& device_name); | 61 const std::string& device_name); |
62 | 62 |
63 // Schedules a redraw on the display thread. May be called from any thread. | 63 // Schedules a redraw on the display thread. May be called from any thread. |
64 void RedrawDesktop(); | 64 void RedrawDesktop(); |
65 | 65 |
66 // Moves the host's cursor to the specified coordinates, optionally with some | 66 // Moves the host's cursor to the specified coordinates, optionally with some |
67 // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made. | 67 // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made. |
68 void PerformMouseAction(int x, int y, | 68 void SendMouseEvent(int x, int y, |
69 protocol::MouseEvent_MouseButton button, | 69 protocol::MouseEvent_MouseButton button, |
70 bool button_down); | 70 bool button_down); |
71 | 71 void SendMouseWheelEvent(int delta_x, int delta_y); |
72 void PerformMouseWheelDeltaAction(int delta_x, int delta_y); | |
73 | 72 |
74 // Sends the provided keyboard scan code to the host. | 73 // Sends the provided keyboard scan code to the host. |
75 void PerformKeyboardAction(int key_code, bool key_down); | 74 void SendKeyEvent(int key_code, bool key_down); |
| 75 |
| 76 void SendTextEvent(const std::string& text); |
76 | 77 |
77 // Records paint time for statistics logging, if enabled. May be called from | 78 // Records paint time for statistics logging, if enabled. May be called from |
78 // any thread. | 79 // any thread. |
79 void RecordPaintTime(int64 paint_time_ms); | 80 void RecordPaintTime(int64 paint_time_ms); |
80 | 81 |
81 // ClientUserInterface implementation. | 82 // ClientUserInterface implementation. |
82 virtual void OnConnectionState( | 83 virtual void OnConnectionState( |
83 protocol::ConnectionToHost::State state, | 84 protocol::ConnectionToHost::State state, |
84 protocol::ErrorCode error) OVERRIDE; | 85 protocol::ErrorCode error) OVERRIDE; |
85 virtual void OnConnectionReady(bool ready) OVERRIDE; | 86 virtual void OnConnectionReady(bool ready) OVERRIDE; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 bool stats_logging_enabled_; | 168 bool stats_logging_enabled_; |
168 | 169 |
169 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 170 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
170 | 171 |
171 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 172 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
172 }; | 173 }; |
173 | 174 |
174 } // namespace remoting | 175 } // namespace remoting |
175 | 176 |
176 #endif | 177 #endif |
OLD | NEW |