Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: remoting/client/chromoting_session.h

Issue 2868383003: [CRD iOS] Send key events to the session. (Closed)
Patch Set: Adding backspace support to the keyboard. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Sends the usb key code to the host.
123 bool SendKeyEvent(int usb_key_code, bool key_down);
Yuwei 2017/05/15 19:38:06 FYI it's not recommended to overload functions in
nicholss 2017/05/15 23:06:10 Acknowledged.
124
125 // Send utf8 encoded text to the host.
120 void SendTextEvent(const std::string& text); 126 void SendTextEvent(const std::string& text);
121 127
122 // Sends the provided touch event payload to the host. 128 // Sends the provided touch event payload to the host.
123 void SendTouchEvent(const protocol::TouchEvent& touch_event); 129 void SendTouchEvent(const protocol::TouchEvent& touch_event);
124 130
125 // Enables or disables the video channel. May be called from any thread. 131 // Enables or disables the video channel. May be called from any thread.
126 void EnableVideoChannel(bool enable); 132 void EnableVideoChannel(bool enable);
127 133
128 void SendClientMessage(const std::string& type, const std::string& data); 134 void SendClientMessage(const std::string& type, const std::string& data);
129 135
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 222
217 base::WeakPtr<ChromotingSession> weak_ptr_; 223 base::WeakPtr<ChromotingSession> weak_ptr_;
218 base::WeakPtrFactory<ChromotingSession> weak_factory_; 224 base::WeakPtrFactory<ChromotingSession> weak_factory_;
219 225
220 DISALLOW_COPY_AND_ASSIGN(ChromotingSession); 226 DISALLOW_COPY_AND_ASSIGN(ChromotingSession);
221 }; 227 };
222 228
223 } // namespace remoting 229 } // namespace remoting
224 230
225 #endif // REMOTING_CLIENT_CHROMOTING_SESSION_H_ 231 #endif // REMOTING_CLIENT_CHROMOTING_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698