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

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: 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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | ash/wm/workspace/snap_sizer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index d80cfea83c1a2deec1c5d574b61f31fa543acb62..02ed385737274d82a07318d07ea97629ef3c92e2 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -836,9 +836,12 @@ 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;
+ if (SnapSizer::CanSnapWindow(window)) {
+ SnapSizer::Edge edge = (action == WINDOW_SNAP_LEFT) ?
+ SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE;
+ SnapSizer::SnapWindow(window, edge, SnapSizer::STEP_YES);
+ }
return true;
}
case WINDOW_MINIMIZE: {
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | ash/wm/workspace/snap_sizer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698