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

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

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undocks window first before side-snapping bounds (nits) Created 7 years, 1 month 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/caption_buttons/frame_maximize_button.cc
diff --git a/ash/wm/caption_buttons/frame_maximize_button.cc b/ash/wm/caption_buttons/frame_maximize_button.cc
index 14526a01360ce1f43908bdbf9135ec830830f44e..d30cebb705f8aa355f6761e8c714269ff63ce6e2 100644
--- a/ash/wm/caption_buttons/frame_maximize_button.cc
+++ b/ash/wm/caption_buttons/frame_maximize_button.cc
@@ -527,16 +527,10 @@ gfx::Point FrameMaximizeButton::LocationForSnapSizer(
void FrameMaximizeButton::Snap(SnapSizer* snap_sizer) {
Shell* shell = Shell::GetInstance();
- wm::WindowState* window_state = wm::GetWindowState(frame_->GetNativeWindow());
switch (snap_type_) {
case SNAP_LEFT:
case SNAP_RIGHT: {
- // Others might also have set up a restore rectangle already. If so, we
- // should not overwrite the restore rectangle.
- gfx::Rect current_bounds_in_screen = frame_->GetWindowBoundsInScreen();
snap_sizer->SnapWindowToTargetBounds();
- if (!window_state->HasRestoreBounds())
- window_state->SetRestoreBoundsInScreen(current_bounds_in_screen);
shell->delegate()->RecordUserMetricsAction(
snap_type_ == SNAP_LEFT ?
UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT :

Powered by Google App Engine
This is Rietveld 408576698