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

Side by Side Diff: remoting/protocol/input_event_tracker.cc

Issue 1908683002: Replace OS_LEFT/RIGHT with META_LEFT/RIGHT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « remoting/host/input_injector_x11.cc ('k') | ui/events/keycodes/dom/keycode_converter.cc » ('j') | 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/protocol/input_event_tracker.h" 5 #include "remoting/protocol/input_event_tracker.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "remoting/proto/event.pb.h" 8 #include "remoting/proto/event.pb.h"
9 9
10 namespace remoting { 10 namespace remoting {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool ctrl_expected, 74 bool ctrl_expected,
75 bool os_expected, 75 bool os_expected,
76 bool shift_expected) { 76 bool shift_expected) {
77 bool alt_down = 77 bool alt_down =
78 pressed_keys_.find(ui::DomCode::ALT_LEFT) != pressed_keys_.end() || 78 pressed_keys_.find(ui::DomCode::ALT_LEFT) != pressed_keys_.end() ||
79 pressed_keys_.find(ui::DomCode::ALT_RIGHT) != pressed_keys_.end(); 79 pressed_keys_.find(ui::DomCode::ALT_RIGHT) != pressed_keys_.end();
80 bool ctrl_down = 80 bool ctrl_down =
81 pressed_keys_.find(ui::DomCode::CONTROL_LEFT) != pressed_keys_.end() || 81 pressed_keys_.find(ui::DomCode::CONTROL_LEFT) != pressed_keys_.end() ||
82 pressed_keys_.find(ui::DomCode::CONTROL_RIGHT) != pressed_keys_.end(); 82 pressed_keys_.find(ui::DomCode::CONTROL_RIGHT) != pressed_keys_.end();
83 bool os_down = 83 bool os_down =
84 pressed_keys_.find(ui::DomCode::OS_LEFT) != pressed_keys_.end() || 84 pressed_keys_.find(ui::DomCode::META_LEFT) != pressed_keys_.end() ||
85 pressed_keys_.find(ui::DomCode::OS_RIGHT) != pressed_keys_.end(); 85 pressed_keys_.find(ui::DomCode::META_RIGHT) != pressed_keys_.end();
86 bool shift_down = 86 bool shift_down =
87 pressed_keys_.find(ui::DomCode::SHIFT_LEFT) != pressed_keys_.end() || 87 pressed_keys_.find(ui::DomCode::SHIFT_LEFT) != pressed_keys_.end() ||
88 pressed_keys_.find(ui::DomCode::SHIFT_RIGHT) != pressed_keys_.end(); 88 pressed_keys_.find(ui::DomCode::SHIFT_RIGHT) != pressed_keys_.end();
89 89
90 if ((alt_down && !alt_expected) || (ctrl_down && !ctrl_expected) || 90 if ((alt_down && !alt_expected) || (ctrl_down && !ctrl_expected) ||
91 (os_down && !os_expected) || (shift_down && !shift_expected)) { 91 (os_down && !os_expected) || (shift_down && !shift_expected)) {
92 ReleaseAll(); 92 ReleaseAll();
93 } 93 }
94 } 94 }
95 95
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 break; 160 break;
161 default: 161 default:
162 break; 162 break;
163 } 163 }
164 input_stub_->InjectTouchEvent(event); 164 input_stub_->InjectTouchEvent(event);
165 } 165 }
166 166
167 } // namespace protocol 167 } // namespace protocol
168 } // namespace remoting 168 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/input_injector_x11.cc ('k') | ui/events/keycodes/dom/keycode_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698