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

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

Issue 2868383003: [CRD iOS] Send key events to the session. (Closed)
Patch Set: Clean up old key input code. No longer used. 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 #include "remoting/client/chromoting_session.h" 5 #include "remoting/client/chromoting_session.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 if (!usb_key_code) { 197 if (!usb_key_code) {
198 LOG(WARNING) << "Ignoring unknown key code: " << key_code 198 LOG(WARNING) << "Ignoring unknown key code: " << key_code
199 << " scan code: " << scan_code; 199 << " scan code: " << scan_code;
200 return false; 200 return false;
201 } 201 }
202 202
203 SendKeyEventInternal(usb_key_code, key_down); 203 SendKeyEventInternal(usb_key_code, key_down);
204 return true; 204 return true;
205 } 205 }
206 206
207 bool ChromotingSession::SendKeyEvent(int key_code, bool key_down) {
208 SendKeyEventInternal(key_code, key_down);
209 return true;
210 }
joedow 2017/05/12 19:13:17 Drive-by: This code looks a bit like the function
nicholss 2017/05/12 20:45:57 I have updated to use usb_key_code as the param na
211
207 void ChromotingSession::SendTextEvent(const std::string& text) { 212 void ChromotingSession::SendTextEvent(const std::string& text) {
208 if (!runtime_->network_task_runner()->BelongsToCurrentThread()) { 213 if (!runtime_->network_task_runner()->BelongsToCurrentThread()) {
209 runtime_->network_task_runner()->PostTask( 214 runtime_->network_task_runner()->PostTask(
210 FROM_HERE, 215 FROM_HERE,
211 base::Bind(&ChromotingSession::SendTextEvent, GetWeakPtr(), text)); 216 base::Bind(&ChromotingSession::SendTextEvent, GetWeakPtr(), text));
212 return; 217 return;
213 } 218 }
214 219
215 protocol::TextEvent event; 220 protocol::TextEvent event;
216 event.set_text(text); 221 event.set_text(text);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 video_renderer_.reset(); 454 video_renderer_.reset();
450 signaling_.reset(); 455 signaling_.reset();
451 perf_tracker_.reset(); 456 perf_tracker_.reset();
452 client_context_.reset(); 457 client_context_.reset();
453 cursor_shape_stub_.reset(); 458 cursor_shape_stub_.reset();
454 459
455 weak_factory_.InvalidateWeakPtrs(); 460 weak_factory_.InvalidateWeakPtrs();
456 } 461 }
457 462
458 } // namespace remoting 463 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698