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

Unified Diff: athena/home/home_card_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 reviews, update unit tests 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 | « no previous file | athena/home/home_card_unittest.cc » ('j') | athena/wm/public/window_manager.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/home_card_impl.cc
diff --git a/athena/home/home_card_impl.cc b/athena/home/home_card_impl.cc
index 3b285fb858adbdf527d43b4fe3fcc2f011a7e1b8..4bbd16d5cb9a1fa55f3a5d42827eb47d2a70ed76 100644
--- a/athena/home/home_card_impl.cc
+++ b/athena/home/home_card_impl.cc
@@ -197,7 +197,7 @@ class HomeCardView : public views::WidgetDelegateView {
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
if (HomeCard::Get()->GetState() == HomeCard::VISIBLE_MINIMIZED &&
event.IsLeftMouseButton() && event.GetClickCount() == 1) {
- athena::WindowManager::Get()->ToggleOverview();
+ athena::WindowManager::Get()->ActivateOverview(false);
return true;
}
return false;
@@ -367,10 +367,13 @@ bool HomeCardImpl::OnAcceleratorFired(int command_id,
const ui::Accelerator& accelerator) {
DCHECK_EQ(COMMAND_SHOW_HOME_CARD, command_id);
- if (state_ == VISIBLE_CENTERED && original_state_ != VISIBLE_BOTTOM)
+ if (state_ == VISIBLE_CENTERED && original_state_ != VISIBLE_BOTTOM) {
SetState(VISIBLE_MINIMIZED);
- else if (state_ == VISIBLE_MINIMIZED)
+ WindowManager::Get()->ActivateOverview(false);
+ } else if (state_ == VISIBLE_MINIMIZED) {
SetState(VISIBLE_CENTERED);
+ WindowManager::Get()->ActivateOverview(true);
+ }
return true;
}
« no previous file with comments | « no previous file | athena/home/home_card_unittest.cc » ('j') | athena/wm/public/window_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698