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

Side by Side Diff: ash/common/wm/lock_window_state.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/lock_window_state.h" 5 #include "ash/common/wm/lock_window_state.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/wm/lock_layout_manager.h" 9 #include "ash/common/wm/lock_layout_manager.h"
10 #include "ash/common/wm/window_animation_types.h" 10 #include "ash/common/wm/window_animation_types.h"
(...skipping 26 matching lines...) Expand all
37 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_FULLSCREEN); 37 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_FULLSCREEN);
38 break; 38 break;
39 case wm::WM_EVENT_PIN: 39 case wm::WM_EVENT_PIN:
40 case wm::WM_EVENT_TRUSTED_PIN: 40 case wm::WM_EVENT_TRUSTED_PIN:
41 NOTREACHED(); 41 NOTREACHED();
42 break; 42 break;
43 case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION: 43 case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION:
44 case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE: 44 case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE:
45 case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE: 45 case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE:
46 case wm::WM_EVENT_TOGGLE_MAXIMIZE: 46 case wm::WM_EVENT_TOGGLE_MAXIMIZE:
47 case wm::WM_EVENT_CYCLE_SNAP_DOCK_LEFT: 47 case wm::WM_EVENT_CYCLE_SNAP_LEFT:
48 case wm::WM_EVENT_CYCLE_SNAP_DOCK_RIGHT: 48 case wm::WM_EVENT_CYCLE_SNAP_RIGHT:
49 case wm::WM_EVENT_CENTER: 49 case wm::WM_EVENT_CENTER:
50 case wm::WM_EVENT_SNAP_LEFT: 50 case wm::WM_EVENT_SNAP_LEFT:
51 case wm::WM_EVENT_SNAP_RIGHT: 51 case wm::WM_EVENT_SNAP_RIGHT:
52 case wm::WM_EVENT_NORMAL: 52 case wm::WM_EVENT_NORMAL:
53 case wm::WM_EVENT_MAXIMIZE: 53 case wm::WM_EVENT_MAXIMIZE:
54 case wm::WM_EVENT_DOCK:
55 UpdateWindow(window_state, 54 UpdateWindow(window_state,
56 GetMaximizedOrCenteredWindowType(window_state)); 55 GetMaximizedOrCenteredWindowType(window_state));
57 return; 56 return;
58 case wm::WM_EVENT_MINIMIZE: 57 case wm::WM_EVENT_MINIMIZE:
59 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED); 58 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED);
60 return; 59 return;
61 case wm::WM_EVENT_SHOW_INACTIVE: 60 case wm::WM_EVENT_SHOW_INACTIVE:
62 return; 61 return;
63 case wm::WM_EVENT_SET_BOUNDS: 62 case wm::WM_EVENT_SET_BOUNDS:
64 if (window_state->IsMaximized() || window_state->IsFullscreen()) { 63 if (window_state->IsMaximized() || window_state->IsFullscreen()) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 keyboard_bounds = keyboard_controller->current_keyboard_bounds(); 174 keyboard_bounds = keyboard_controller->current_keyboard_bounds();
176 } 175 }
177 gfx::Rect bounds = wm::GetDisplayBoundsWithShelf(window_state->window()); 176 gfx::Rect bounds = wm::GetDisplayBoundsWithShelf(window_state->window());
178 bounds.set_height(bounds.height() - keyboard_bounds.height()); 177 bounds.set_height(bounds.height() - keyboard_bounds.height());
179 178
180 VLOG(1) << "Updating window bounds to: " << bounds.ToString(); 179 VLOG(1) << "Updating window bounds to: " << bounds.ToString();
181 window_state->SetBoundsDirect(bounds); 180 window_state->SetBoundsDirect(bounds);
182 } 181 }
183 182
184 } // namespace ash 183 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698