Index: chrome/browser/ui/ash/ash_util.cc |
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc |
index 3b72621e6afeb8b1d4cb34445cb304912b0ae17b..9b5016ea27214fc4c4c46adadf8cc9a1711c6b9d 100644 |
--- a/chrome/browser/ui/ash/ash_util.cc |
+++ b/chrome/browser/ui/ash/ash_util.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/ui/ash/ash_util.h" |
+#include "ash/accelerators/accelerator_controller.h" |
#include "ash/shell.h" |
#include "chrome/browser/ui/ash/ash_init.h" |
#include "chrome/browser/ui/host_desktop.h" |
@@ -50,4 +51,17 @@ bool IsNativeWindowInAsh(gfx::NativeWindow native_window) { |
return IsNativeViewInAsh(native_window); |
} |
+bool IsAcceleratorDeprecated(const ui::Accelerator accelerator) { |
+ if (!ash::Shell::HasInstance()) |
+ return false; |
oshima
2015/06/19 21:21:45
this shouldn't be nullptr too.
afakhry
2015/06/19 22:14:19
Done. However there's a similar test for this case
|
+ |
+ ash::AcceleratorController* controller = |
sky
2015/06/19 21:00:48
Do we really allow this to be null?
afakhry
2015/06/19 22:14:19
Done.
|
+ ash::Shell::GetInstance()->accelerator_controller(); |
+ |
+ if (!controller) |
+ return false; |
+ |
+ return controller->IsDeprecated(accelerator); |
+} |
+ |
} // namespace chrome |