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

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

Issue 1145863002: Disable stuck key detection on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase & fix compilation errors. Created 5 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 | « remoting/client/plugin/pepper_input_handler.h ('k') | 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/pepper_input_handler.h" 5 #include "remoting/client/plugin/pepper_input_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/cpp/image_data.h" 8 #include "ppapi/cpp/image_data.h"
9 #include "ppapi/cpp/input_event.h" 9 #include "ppapi/cpp/input_event.h"
10 #include "ppapi/cpp/module_impl.h" 10 #include "ppapi/cpp/module_impl.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 PepperInputHandler::PepperInputHandler( 111 PepperInputHandler::PepperInputHandler(
112 protocol::InputEventTracker* input_tracker) 112 protocol::InputEventTracker* input_tracker)
113 : input_stub_(nullptr), 113 : input_stub_(nullptr),
114 input_tracker_(input_tracker), 114 input_tracker_(input_tracker),
115 has_focus_(false), 115 has_focus_(false),
116 send_mouse_input_when_unfocused_(false), 116 send_mouse_input_when_unfocused_(false),
117 send_mouse_move_deltas_(false), 117 send_mouse_move_deltas_(false),
118 wheel_delta_x_(0), 118 wheel_delta_x_(0),
119 wheel_delta_y_(0), 119 wheel_delta_y_(0),
120 wheel_ticks_x_(0), 120 wheel_ticks_x_(0),
121 wheel_ticks_y_(0) { 121 wheel_ticks_y_(0),
122 detect_stuck_modifiers_(false) {
122 } 123 }
123 124
124 bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { 125 bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) {
125 ReleaseAllIfModifiersStuck(event); 126 if (detect_stuck_modifiers_)
127 ReleaseAllIfModifiersStuck(event);
126 128
127 switch (event.GetType()) { 129 switch (event.GetType()) {
128 // Touch input cases. 130 // Touch input cases.
129 case PP_INPUTEVENT_TYPE_TOUCHSTART: 131 case PP_INPUTEVENT_TYPE_TOUCHSTART:
130 case PP_INPUTEVENT_TYPE_TOUCHMOVE: 132 case PP_INPUTEVENT_TYPE_TOUCHMOVE:
131 case PP_INPUTEVENT_TYPE_TOUCHEND: 133 case PP_INPUTEVENT_TYPE_TOUCHEND:
132 case PP_INPUTEVENT_TYPE_TOUCHCANCEL: { 134 case PP_INPUTEVENT_TYPE_TOUCHCANCEL: {
133 if (!input_stub_) 135 if (!input_stub_)
134 return true; 136 return true;
135 pp::TouchInputEvent pp_touch_event(event); 137 pp::TouchInputEvent pp_touch_event(event);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 input_tracker_->ReleaseAllIfModifiersStuck( 286 input_tracker_->ReleaseAllIfModifiersStuck(
285 (modifiers & PP_INPUTEVENT_MODIFIER_ALTKEY) != 0, 287 (modifiers & PP_INPUTEVENT_MODIFIER_ALTKEY) != 0,
286 (modifiers & PP_INPUTEVENT_MODIFIER_CONTROLKEY) != 0, 288 (modifiers & PP_INPUTEVENT_MODIFIER_CONTROLKEY) != 0,
287 (modifiers & PP_INPUTEVENT_MODIFIER_METAKEY) != 0, 289 (modifiers & PP_INPUTEVENT_MODIFIER_METAKEY) != 0,
288 (modifiers & PP_INPUTEVENT_MODIFIER_SHIFTKEY) != 0); 290 (modifiers & PP_INPUTEVENT_MODIFIER_SHIFTKEY) != 0);
289 } 291 }
290 } 292 }
291 } 293 }
292 294
293 } // namespace remoting 295 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698