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

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

Issue 2724913002: Move chromeos::EventRewriter to //ui/chromeos/events (Closed)
Patch Set: Fix a typo Created 3 years, 9 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 | « chrome/common/pref_names.cc ('k') | ui/chromeos/events/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/normalizing_input_filter_cros.h" 5 #include "remoting/client/normalizing_input_filter_cros.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/events/keycodes/dom/dom_code.h" 8 #include "ui/events/keycodes/dom/dom_code.h"
9 9
10 namespace remoting { 10 namespace remoting {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // as Alt followed by RightClick. However, because there are other ways to 75 // as Alt followed by RightClick. However, because there are other ways to
76 // generate RightClick (two-finger tap, for example), rather than suppressing 76 // generate RightClick (two-finger tap, for example), rather than suppressing
77 // the Alt key as we do for the OSKey (which would allow Alt+LeftClick to be 77 // the Alt key as we do for the OSKey (which would allow Alt+LeftClick to be
78 // interpreted as interpreted as RightClick as per the ChromeOS idiom), the 78 // interpreted as interpreted as RightClick as per the ChromeOS idiom), the
79 // filter maps RightClick to LeftClick while LeftAlt is held, which allows 79 // filter maps RightClick to LeftClick while LeftAlt is held, which allows
80 // Alt+LeftClick to be injected. The equivalent mapping using RightAlt is 80 // Alt+LeftClick to be injected. The equivalent mapping using RightAlt is
81 // unchanged, allowing Alt+RightClick also to be injected, as long as the 81 // unchanged, allowing Alt+RightClick also to be injected, as long as the
82 // target application doesn't distinguish between left and right Alt keys. 82 // target application doesn't distinguish between left and right Alt keys.
83 // 83 //
84 // This file must be kept up to date with changes to 84 // This file must be kept up to date with changes to
85 // chrome/browser/chromeos/events/event_rewriter.cc 85 // ui/chromeos/events/event_rewriter_chromeos.cc
86
87 86
88 NormalizingInputFilterCros::NormalizingInputFilterCros( 87 NormalizingInputFilterCros::NormalizingInputFilterCros(
89 protocol::InputStub* input_stub) 88 protocol::InputStub* input_stub)
90 : protocol::InputFilter(input_stub), 89 : protocol::InputFilter(input_stub),
91 deferred_key_is_rewriting_(false), 90 deferred_key_is_rewriting_(false),
92 modifying_key_(0), 91 modifying_key_(0),
93 left_alt_is_pressed_(false), 92 left_alt_is_pressed_(false),
94 right_alt_is_pressed_(false), 93 right_alt_is_pressed_(false),
95 previous_mouse_x_(-1), 94 previous_mouse_x_(-1),
96 previous_mouse_y_(-1) { 95 previous_mouse_y_(-1) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 case static_cast<uint32_t>(ui::DomCode::PAGE_UP): 235 case static_cast<uint32_t>(ui::DomCode::PAGE_UP):
237 event->set_usb_keycode(static_cast<uint32_t>(ui::DomCode::ARROW_UP)); 236 event->set_usb_keycode(static_cast<uint32_t>(ui::DomCode::ARROW_UP));
238 break; 237 break;
239 case static_cast<uint32_t>(ui::DomCode::DEL): 238 case static_cast<uint32_t>(ui::DomCode::DEL):
240 event->set_usb_keycode(static_cast<uint32_t>(ui::DomCode::BACKSPACE)); 239 event->set_usb_keycode(static_cast<uint32_t>(ui::DomCode::BACKSPACE));
241 break; 240 break;
242 } 241 }
243 } 242 }
244 243
245 } // namespace remoting 244 } // namespace remoting
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | ui/chromeos/events/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698