Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: ui/aura_shell/shell.cc

Issue 8465021: Add ShellAcceleratorController that managers global keyboard accelerators. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/aura/desktop.cc ('K') | « ui/aura_shell/shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/shell.cc
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index dc40423beb690ee3840f3c19588454a8548f6f58..79cf3f2f4facec95f9fc83d1ba88c9e69bd6950f 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -23,6 +23,7 @@
#include "ui/aura_shell/toplevel_layout_manager.h"
#include "ui/aura_shell/toplevel_window_event_filter.h"
#include "ui/aura_shell/workspace_controller.h"
+#include "ui/base/accelerator_manager.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animator.h"
#include "views/widget/native_widget_aura.h"
@@ -84,7 +85,8 @@ Shell* Shell::instance_ = NULL;
Shell::Shell(ShellDelegate* delegate)
: ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
- delegate_(delegate) {
+ delegate_(delegate),
+ accelerator_manager_(new ui::AcceleratorManager) {
aura::Desktop::GetInstance()->SetEventFilter(
new internal::DesktopEventFilter);
aura::Desktop::GetInstance()->SetStackingClient(
@@ -167,6 +169,8 @@ void Shell::Init() {
toplevel_layout_manager->set_shelf(shelf_layout_controller_.get());
}
+ desktop_window->RegisterAccelerators(accelerator_manager());
+
// Force a layout.
desktop_layout->OnWindowResized();
}
« ui/aura/desktop.cc ('K') | « ui/aura_shell/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698