| 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 "chrome/browser/ui/ash/ash_util.h" | 5 #include "chrome/browser/ui/ash/ash_util.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/ui/ash/ash_init.h" | 10 #include "chrome/browser/ui/ash/ash_init.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 return false; | 54 return false; |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool IsNativeWindowInAsh(gfx::NativeWindow native_window) { | 57 bool IsNativeWindowInAsh(gfx::NativeWindow native_window) { |
| 58 return IsNativeViewInAsh(native_window); | 58 return IsNativeViewInAsh(native_window); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) { | 61 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) { |
| 62 // When running in mash the browser doesn't handle ash accelerators. |
| 63 if (chrome::IsRunningInMash()) |
| 64 return false; |
| 65 |
| 62 ash::AcceleratorController* controller = | 66 ash::AcceleratorController* controller = |
| 63 ash::Shell::GetInstance()->accelerator_controller(); | 67 ash::Shell::GetInstance()->accelerator_controller(); |
| 64 return controller->IsDeprecated(accelerator); | 68 return controller->IsDeprecated(accelerator); |
| 65 } | 69 } |
| 66 | 70 |
| 67 } // namespace chrome | 71 } // namespace chrome |
| OLD | NEW |