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

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
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index d80cfea83c1a2deec1c5d574b61f31fa543acb62..daa017c13bf62f368bf0a59040cd3e3d634f3c45 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -47,7 +47,6 @@
#include "ash/wm/property_util.h"
#include "ash/wm/window_cycle_controller.h"
#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "content/public/browser/gpu_data_manager.h"
@@ -836,9 +835,11 @@ bool AcceleratorController::PerformAction(int action,
break;
}
- internal::SnapSizer::SnapWindow(window,
- action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE :
- internal::SnapSizer::RIGHT_EDGE);
+ if (wm::CanSnapWindow(window)) {
+ wm::SnapWindowToEdge(window,
+ action == WINDOW_SNAP_LEFT ? wm::SNAP_LEFT_EDGE :
+ wm::SNAP_RIGHT_EDGE);
+ }
return true;
}
case WINDOW_MINIMIZE: {

Powered by Google App Engine
This is Rietveld 408576698