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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1980063002: Inject synthetic key events later in the input pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "remoting/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <nacl_io/nacl_io.h> 7 #include <nacl_io/nacl_io.h>
8 #include <sys/mount.h> 8 #include <sys/mount.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 LOG(ERROR) << "Invalid injectKeyEvent."; 735 LOG(ERROR) << "Invalid injectKeyEvent.";
736 return; 736 return;
737 } 737 }
738 738
739 protocol::KeyEvent event; 739 protocol::KeyEvent event;
740 event.set_usb_keycode(usb_keycode); 740 event.set_usb_keycode(usb_keycode);
741 event.set_pressed(is_pressed); 741 event.set_pressed(is_pressed);
742 742
743 // Inject after the KeyEventMapper, so the event won't get mapped or trapped. 743 // Inject after the KeyEventMapper, so the event won't get mapped or trapped.
744 if (IsConnected()) 744 if (IsConnected())
745 input_tracker_.InjectKeyEvent(event); 745 touch_input_scaler_.InjectKeyEvent(event);
746 } 746 }
747 747
748 void ChromotingInstance::HandleRemapKey(const base::DictionaryValue& data) { 748 void ChromotingInstance::HandleRemapKey(const base::DictionaryValue& data) {
749 int from_keycode = 0; 749 int from_keycode = 0;
750 int to_keycode = 0; 750 int to_keycode = 0;
751 if (!data.GetInteger("fromKeycode", &from_keycode) || 751 if (!data.GetInteger("fromKeycode", &from_keycode) ||
752 !data.GetInteger("toKeycode", &to_keycode)) { 752 !data.GetInteger("toKeycode", &to_keycode)) {
753 LOG(ERROR) << "Invalid remapKey."; 753 LOG(ERROR) << "Invalid remapKey.";
754 return; 754 return;
755 } 755 }
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 if (is_custom_counts_histogram) { 1114 if (is_custom_counts_histogram) {
1115 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1115 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1116 histogram_max, histogram_buckets); 1116 histogram_max, histogram_buckets);
1117 } else { 1117 } else {
1118 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1118 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1119 histogram_max, histogram_buckets); 1119 histogram_max, histogram_buckets);
1120 } 1120 }
1121 } 1121 }
1122 1122
1123 } // namespace remoting 1123 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698