OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/accelerators/key_hold_detector.h" | 5 #include "ash/accelerators/key_hold_detector.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 #undef RootWindow | 9 #undef RootWindow |
10 #undef Status | 10 #undef Status |
11 | 11 |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "ui/aura/root_window.h" | 14 #include "ui/aura/window_event_dispatcher.h" |
15 #include "ui/aura/window_tracker.h" | 15 #include "ui/aura/window_tracker.h" |
16 #include "ui/events/event_dispatcher.h" | 16 #include "ui/events/event_dispatcher.h" |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 namespace { | 19 namespace { |
20 | 20 |
21 void DispatchPressedEvent(XEvent native_event, | 21 void DispatchPressedEvent(XEvent native_event, |
22 scoped_ptr<aura::WindowTracker> tracker) { | 22 scoped_ptr<aura::WindowTracker> tracker) { |
23 // The target window may be gone. | 23 // The target window may be gone. |
24 if (tracker->windows().empty()) | 24 if (tracker->windows().empty()) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 delegate_->OnKeyUnhold(event); | 89 delegate_->OnKeyUnhold(event); |
90 event->StopPropagation(); | 90 event->StopPropagation(); |
91 break; | 91 break; |
92 } | 92 } |
93 } | 93 } |
94 state_ = INITIAL; | 94 state_ = INITIAL; |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 } // namespace ash | 98 } // namespace ash |
OLD | NEW |