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

Unified Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 9773009: Disable left/right/maximize for panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/wm/workspace/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 989b288cb3ba2a22a0ee6bbb9fa28ecbbaa717e5..bbc5c250948db2a5701a337a41d178454d4e5a6b 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -96,6 +96,8 @@ FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener,
: ImageButton(listener),
frame_(frame),
is_snap_enabled_(false),
+ is_left_right_enabled_(true),
+ is_maximize_enabled_(true),
exceeded_drag_threshold_(false),
snap_type_(SNAP_NONE) {
// TODO(sky): nuke this. It's temporary while we don't have good images.
@@ -235,6 +237,10 @@ void FrameMaximizeButton::UpdateSnap(const gfx::Point& location) {
}
return;
}
+ if ((!is_left_right_enabled_ && (type == SNAP_LEFT || type == SNAP_RIGHT)) ||
sky 2012/03/25 22:53:05 Move this to SnapTypeForLocation, otherwise we're
stevenjb 2012/03/25 23:11:37 Done.
+ (!is_maximize_enabled_ && type == SNAP_MAXIMIZE)) {
+ return;
+ }
snap_type_ = type;
snap_sizer_.reset();

Powered by Google App Engine
This is Rietveld 408576698