OLD | NEW |
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 "ash/sticky_keys/sticky_keys_controller.h" | 5 #include "ash/sticky_keys/sticky_keys_controller.h" |
6 | 6 |
7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #undef RootWindow | 10 #undef RootWindow |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 new StickyKeysHandler(ui::EF_CONTROL_DOWN, | 121 new StickyKeysHandler(ui::EF_CONTROL_DOWN, |
122 new StickyKeysHandlerDelegateImpl())); | 122 new StickyKeysHandlerDelegateImpl())); |
123 } | 123 } |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 bool StickyKeysController::HandleKeyEvent(ui::KeyEvent* event) { | 127 bool StickyKeysController::HandleKeyEvent(ui::KeyEvent* event) { |
128 return shift_sticky_key_->HandleKeyEvent(event) || | 128 return shift_sticky_key_->HandleKeyEvent(event) || |
129 alt_sticky_key_->HandleKeyEvent(event) || | 129 alt_sticky_key_->HandleKeyEvent(event) || |
130 ctrl_sticky_key_->HandleKeyEvent(event); | 130 ctrl_sticky_key_->HandleKeyEvent(event); |
131 return ctrl_sticky_key_->HandleKeyEvent(event); | |
132 } | 131 } |
133 | 132 |
134 bool StickyKeysController::HandleMouseEvent(ui::MouseEvent* event) { | 133 bool StickyKeysController::HandleMouseEvent(ui::MouseEvent* event) { |
135 return shift_sticky_key_->HandleMouseEvent(event) || | 134 return shift_sticky_key_->HandleMouseEvent(event) || |
136 alt_sticky_key_->HandleMouseEvent(event) || | 135 alt_sticky_key_->HandleMouseEvent(event) || |
137 ctrl_sticky_key_->HandleMouseEvent(event); | 136 ctrl_sticky_key_->HandleMouseEvent(event); |
138 } | 137 } |
139 | 138 |
140 bool StickyKeysController::HandleScrollEvent(ui::ScrollEvent* event) { | 139 bool StickyKeysController::HandleScrollEvent(ui::ScrollEvent* event) { |
141 return shift_sticky_key_->HandleScrollEvent(event) || | 140 return shift_sticky_key_->HandleScrollEvent(event) || |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 &xievent->mods.effective)); | 437 &xievent->mods.effective)); |
439 } | 438 } |
440 } | 439 } |
441 #elif defined(USE_OZONE) | 440 #elif defined(USE_OZONE) |
442 NOTIMPLEMENTED() << "Modifier key is not handled"; | 441 NOTIMPLEMENTED() << "Modifier key is not handled"; |
443 #endif | 442 #endif |
444 event->set_flags(event->flags() | modifier_flag_); | 443 event->set_flags(event->flags() | modifier_flag_); |
445 } | 444 } |
446 | 445 |
447 } // namespace ash | 446 } // namespace ash |
OLD | NEW |