| OLD | NEW |
| 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 "ash/accelerators/accelerator_dispatcher.h" | 5 #include "ash/accelerators/accelerator_dispatcher.h" |
| 6 | 6 |
| 7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 // Xlib defines RootWindow | 10 // Xlib defines RootWindow |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (IsKeyEvent(event)) { | 74 if (IsKeyEvent(event)) { |
| 75 ash::AcceleratorController* accelerator_controller = | 75 ash::AcceleratorController* accelerator_controller = |
| 76 ash::Shell::GetInstance()->accelerator_controller(); | 76 ash::Shell::GetInstance()->accelerator_controller(); |
| 77 if (accelerator_controller) { | 77 if (accelerator_controller) { |
| 78 ui::Accelerator accelerator(ui::KeyboardCodeFromNative(event), | 78 ui::Accelerator accelerator(ui::KeyboardCodeFromNative(event), |
| 79 ui::EventFlagsFromNative(event) & kModifierMask); | 79 ui::EventFlagsFromNative(event) & kModifierMask); |
| 80 if (IsKeyRelease(event)) | 80 if (IsKeyRelease(event)) |
| 81 accelerator.set_type(ui::ET_KEY_RELEASED); | 81 accelerator.set_type(ui::ET_KEY_RELEASED); |
| 82 if (accelerator_controller->Process(accelerator)) | 82 if (accelerator_controller->Process(accelerator)) |
| 83 return true; | 83 return true; |
| 84 accelerator.set_type(aura::TranslatedKeyEvent(event, false).type()); | |
| 85 if (accelerator_controller->Process(accelerator)) | |
| 86 return true; | |
| 87 } | 84 } |
| 88 } | 85 } |
| 89 | 86 |
| 90 return nested_dispatcher_->Dispatch(event); | 87 return nested_dispatcher_->Dispatch(event); |
| 91 } | 88 } |
| 92 | 89 |
| 93 } // namespace ash | 90 } // namespace ash |
| OLD | NEW |