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

Unified Diff: ui/aura_shell/desktop_event_filter.cc

Issue 8465021: Add ShellAcceleratorController that managers global keyboard accelerators. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address tfarina's 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
« no previous file with comments | « ui/aura_shell/desktop_event_filter.h ('k') | ui/aura_shell/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/desktop_event_filter.cc
diff --git a/ui/aura_shell/desktop_event_filter.cc b/ui/aura_shell/desktop_event_filter.cc
index dc4b4cf0ff47458fc16902ca2c431da09eabd4b2..67a75ea779e1ebfa3e85da5c6d676af897214b82 100644
--- a/ui/aura_shell/desktop_event_filter.cc
+++ b/ui/aura_shell/desktop_event_filter.cc
@@ -9,6 +9,7 @@
#include "ui/aura/focus_manager.h"
#include "ui/aura/window_delegate.h"
#include "ui/aura_shell/shell.h"
+#include "ui/aura_shell/shell_accelerator_filter.h"
#include "ui/aura_shell/stacking_controller.h"
#include "ui/base/hit_test.h"
@@ -43,13 +44,16 @@ gfx::NativeCursor CursorForWindowComponent(int window_component) {
// DesktopEventFilter, public:
DesktopEventFilter::DesktopEventFilter()
- : EventFilter(aura::Desktop::GetInstance()) {
+ : EventFilter(aura::Desktop::GetInstance()),
+ shell_accelerator_filter_(new ShellAcceleratorFilter) {
+ AddFilter(shell_accelerator_filter_.get());
}
DesktopEventFilter::~DesktopEventFilter() {
// Additional filters are not owned by DesktopEventFilter and they
// should all be removed when running here. |filters_| has
// check_empty == true and will DCHECK failure if it is not empty.
+ RemoveFilter(shell_accelerator_filter_.get());
}
void DesktopEventFilter::AddFilter(aura::EventFilter* filter) {
« no previous file with comments | « ui/aura_shell/desktop_event_filter.h ('k') | ui/aura_shell/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698