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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 23471004: Only support left/right maximizing at 50% width when the --ash-enable-alternate-caption-button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch is now friendlier to pending docking changes Created 7 years, 4 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
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index d80cfea83c1a2deec1c5d574b61f31fa543acb62..57eb05c70be5bd54ff868f884c3e5d10798bd8da 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -836,9 +836,11 @@ bool AcceleratorController::PerformAction(int action,
break;
}
- internal::SnapSizer::SnapWindow(window,
- action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE :
- internal::SnapSizer::RIGHT_EDGE);
+ using internal::SnapSizer;
varkha 2013/08/30 17:13:25 Is there a reason that ScopedLayerAnimationSetting
pkotwicz 2013/08/30 21:10:57 Good catch! You are right that we probably should
+ SnapSizer::Edge edge = (action == WINDOW_SNAP_LEFT) ?
+ SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE;
+ if (SnapSizer::CanSnapWindow(window, edge))
+ SnapSizer::SnapWindow(window, edge, SnapSizer::STEP_YES);
return true;
}
case WINDOW_MINIMIZE: {

Powered by Google App Engine
This is Rietveld 408576698