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

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

Issue 597683003: Add window states docked; and docked minimized. Add wm window event to set docked and undocked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dock
Patch Set: Pull forward a change from the dependant CL to this Created 6 years, 2 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
« no previous file with comments | « ash/wm/drag_details.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/wm/lock_window_state.h" 5 #include "ash/wm/lock_window_state.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/lock_layout_manager.h" 9 #include "ash/wm/lock_layout_manager.h"
10 #include "ash/wm/window_animations.h" 10 #include "ash/wm/window_animations.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 break; 43 break;
44 case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION: 44 case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION:
45 case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE: 45 case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE:
46 case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE: 46 case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE:
47 case wm::WM_EVENT_TOGGLE_MAXIMIZE: 47 case wm::WM_EVENT_TOGGLE_MAXIMIZE:
48 case wm::WM_EVENT_CENTER: 48 case wm::WM_EVENT_CENTER:
49 case wm::WM_EVENT_SNAP_LEFT: 49 case wm::WM_EVENT_SNAP_LEFT:
50 case wm::WM_EVENT_SNAP_RIGHT: 50 case wm::WM_EVENT_SNAP_RIGHT:
51 case wm::WM_EVENT_NORMAL: 51 case wm::WM_EVENT_NORMAL:
52 case wm::WM_EVENT_MAXIMIZE: 52 case wm::WM_EVENT_MAXIMIZE:
53 case wm::WM_EVENT_DOCK:
53 UpdateWindow(window_state, 54 UpdateWindow(window_state,
54 GetMaximizedOrCenteredWindowType(window_state)); 55 GetMaximizedOrCenteredWindowType(window_state));
55 return; 56 return;
56 case wm::WM_EVENT_MINIMIZE: 57 case wm::WM_EVENT_MINIMIZE:
57 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED); 58 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED);
58 return; 59 return;
59 case wm::WM_EVENT_SHOW_INACTIVE: 60 case wm::WM_EVENT_SHOW_INACTIVE:
60 return; 61 return;
61 case wm::WM_EVENT_SET_BOUNDS: 62 case wm::WM_EVENT_SET_BOUNDS:
62 if (window_state->IsMaximized() || window_state->IsFullscreen()) { 63 if (window_state->IsMaximized() || window_state->IsFullscreen()) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 176
176 gfx::Rect bounds = 177 gfx::Rect bounds =
177 ScreenUtil::GetDisplayBoundsInParent(window_state->window()); 178 ScreenUtil::GetDisplayBoundsInParent(window_state->window());
178 bounds.set_height(bounds.height() - keyboard_bounds.height()); 179 bounds.set_height(bounds.height() - keyboard_bounds.height());
179 180
180 VLOG(1) << "Updating window bounds to: " << bounds.ToString(); 181 VLOG(1) << "Updating window bounds to: " << bounds.ToString();
181 window_state->SetBoundsDirect(bounds); 182 window_state->SetBoundsDirect(bounds);
182 } 183 }
183 184
184 } // namespace ash 185 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/drag_details.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698