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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void StickyKeysHandlerDelegateImpl::DispatchScrollEvent( | 79 void StickyKeysHandlerDelegateImpl::DispatchScrollEvent( |
80 ui::ScrollEvent* event, | 80 ui::ScrollEvent* event, |
81 aura::Window* target) { | 81 aura::Window* target) { |
82 DispatchEvent(event, target); | 82 DispatchEvent(event, target); |
83 } | 83 } |
84 | 84 |
85 void StickyKeysHandlerDelegateImpl::DispatchEvent(ui::Event* event, | 85 void StickyKeysHandlerDelegateImpl::DispatchEvent(ui::Event* event, |
86 aura::Window* target) { | 86 aura::Window* target) { |
87 DCHECK(target); | 87 DCHECK(target); |
88 ui::EventDispatchDetails details = | 88 ui::EventDispatchDetails details = |
89 target->GetDispatcher()->OnEventFromSource(event); | 89 target->GetHost()->dispatcher()->OnEventFromSource(event); |
90 if (details.dispatcher_destroyed) | 90 if (details.dispatcher_destroyed) |
91 return; | 91 return; |
92 } | 92 } |
93 | 93 |
94 } // namespace | 94 } // namespace |
95 | 95 |
96 /////////////////////////////////////////////////////////////////////////////// | 96 /////////////////////////////////////////////////////////////////////////////// |
97 // StickyKeys | 97 // StickyKeys |
98 StickyKeysController::StickyKeysController() | 98 StickyKeysController::StickyKeysController() |
99 : enabled_(false) { | 99 : enabled_(false) { |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 &xievent->mods.effective)); | 474 &xievent->mods.effective)); |
475 } | 475 } |
476 } | 476 } |
477 #elif defined(USE_OZONE) | 477 #elif defined(USE_OZONE) |
478 NOTIMPLEMENTED() << "Modifier key is not handled"; | 478 NOTIMPLEMENTED() << "Modifier key is not handled"; |
479 #endif | 479 #endif |
480 event->set_flags(event->flags() | modifier_flag_); | 480 event->set_flags(event->flags() | modifier_flag_); |
481 } | 481 } |
482 | 482 |
483 } // namespace ash | 483 } // namespace ash |
OLD | NEW |