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

Unified Diff: athena/wm/window_manager_impl.cc

Issue 601333002: ESC accelerator and consistent overview mode for Athena homecard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 6 years, 2 months 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 | « athena/wm/window_manager_impl.h ('k') | athena/wm/window_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_impl.cc
diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc
index b9f4c76124a46a59a75116973a6d12f39d720571..3e6e3904f63c3010949e1e95bfaf866ddf3bb69b 100644
--- a/athena/wm/window_manager_impl.cc
+++ b/athena/wm/window_manager_impl.cc
@@ -213,6 +213,7 @@ void WindowManagerImpl::EnterOverview() {
overview_ = WindowOverviewMode::Create(
container_.get(), window_list_provider_.get(),
split_view_controller_.get(), this);
+ AcceleratorManager::Get()->RegisterAccelerator(kEscAcceleratorData, this);
}
void WindowManagerImpl::ExitOverview() {
@@ -244,6 +245,7 @@ void WindowManagerImpl::ExitOverviewNoActivate() {
bezel_controller_->set_left_right_delegate(split_view_controller_.get());
overview_.reset();
FOR_EACH_OBSERVER(WindowManagerObserver, observers_, OnOverviewModeExit());
+ AcceleratorManager::Get()->UnregisterAccelerator(kEscAcceleratorData, this);
}
void WindowManagerImpl::InstallAccelerators() {
@@ -342,6 +344,9 @@ bool WindowManagerImpl::IsCommandEnabled(int command_id) const {
bool WindowManagerImpl::OnAcceleratorFired(int command_id,
const ui::Accelerator& accelerator) {
switch (command_id) {
+ case CMD_EXIT_OVERVIEW:
+ ExitOverview();
+ break;
case CMD_TOGGLE_OVERVIEW:
if (IsOverviewModeActive())
ExitOverview();
« no previous file with comments | « athena/wm/window_manager_impl.h ('k') | athena/wm/window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698