Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_view.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
| index f440dfc461c470951f4362448db56c19bc93f606..fdbc82b9f3db5564db0eb4dbc212f6673a0127bd 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -2461,6 +2461,13 @@ void BrowserView::LoadAccelerators() { |
| chrome::GetAcceleratorList()); |
| for (std::vector<chrome::AcceleratorMapping>::const_iterator it = |
| accelerator_list.begin(); it != accelerator_list.end(); ++it) { |
| +#if defined(OS_CHROMEOS) |
|
sky
2013/03/04 22:25:14
Don't we want this when in ash mode too?
xiyuan
2013/03/04 22:38:32
Good point. Removed.
|
| + // Only allow accelerators of white listed commands to pass through. |
| + static const bool is_app_mode = chrome::IsRunningInForcedAppMode(); |
|
sky
2013/03/04 22:25:14
Is there a compelling reason to make this static?
xiyuan
2013/03/04 22:38:32
Moved it outside the loop and removed "static".
|
| + if (is_app_mode && !chrome::IsCommandAllowedInAppMode(it->command_id)) |
| + continue; |
| +#endif |
| + |
| ui::Accelerator accelerator(it->keycode, it->modifiers); |
| accelerator_table_[accelerator] = it->command_id; |