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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_window_state.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 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/common/wm/maximize_mode/maximize_mode_window_state.cc
diff --git a/ash/common/wm/maximize_mode/maximize_mode_window_state.cc b/ash/common/wm/maximize_mode/maximize_mode_window_state.cc
index fc240bb71a2dcac5f63c4697ddb91d0dd40efde3..d0d76ba54e1e86f3a695f44bbb640404245304e7 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_window_state.cc
+++ b/ash/common/wm/maximize_mode/maximize_mode_window_state.cc
@@ -73,18 +73,7 @@ gfx::Rect GetRestoreBounds(wm::WindowState* window_state) {
if (!restore_bounds.IsEmpty())
return restore_bounds;
}
- gfx::Rect bounds = window_state->window()->GetBoundsInScreen();
- if (window_state->IsDocked()) {
- gfx::Rect restore_bounds = window_state->GetRestoreBoundsInScreen();
- // Use current window horizontal offset origin in order to preserve docked
- // alignment but preserve restored size and vertical offset for the time
- // when the window gets undocked.
- if (!restore_bounds.IsEmpty()) {
- bounds.set_size(restore_bounds.size());
- bounds.set_y(restore_bounds.y());
- }
- }
- return bounds;
+ return window_state->window()->GetBoundsInScreen();
}
} // namespace
@@ -150,14 +139,13 @@ void MaximizeModeWindowState::OnWMEvent(wm::WindowState* window_state,
case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE:
case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE:
case wm::WM_EVENT_TOGGLE_MAXIMIZE:
- case wm::WM_EVENT_CYCLE_SNAP_DOCK_LEFT:
- case wm::WM_EVENT_CYCLE_SNAP_DOCK_RIGHT:
+ case wm::WM_EVENT_CYCLE_SNAP_LEFT:
+ case wm::WM_EVENT_CYCLE_SNAP_RIGHT:
case wm::WM_EVENT_CENTER:
case wm::WM_EVENT_SNAP_LEFT:
case wm::WM_EVENT_SNAP_RIGHT:
case wm::WM_EVENT_NORMAL:
case wm::WM_EVENT_MAXIMIZE:
- case wm::WM_EVENT_DOCK:
UpdateWindow(window_state, GetMaximizedOrCenteredWindowType(window_state),
true);
return;
« no previous file with comments | « ash/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/common/wm/mru_window_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698