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

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: Created 6 years, 3 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/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:
54 case wm::WM_EVENT_UNDOCK:
53 UpdateWindow(window_state, 55 UpdateWindow(window_state,
54 GetMaximizedOrCenteredWindowType(window_state)); 56 GetMaximizedOrCenteredWindowType(window_state));
55 return; 57 return;
56 case wm::WM_EVENT_MINIMIZE: 58 case wm::WM_EVENT_MINIMIZE:
57 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED); 59 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED);
58 return; 60 return;
59 case wm::WM_EVENT_SHOW_INACTIVE: 61 case wm::WM_EVENT_SHOW_INACTIVE:
60 return; 62 return;
61 case wm::WM_EVENT_SET_BOUNDS: 63 case wm::WM_EVENT_SET_BOUNDS:
62 if (window_state->IsMaximized() || window_state->IsFullscreen()) { 64 if (window_state->IsMaximized() || window_state->IsFullscreen()) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 177
176 gfx::Rect bounds = 178 gfx::Rect bounds =
177 ScreenUtil::GetDisplayBoundsInParent(window_state->window()); 179 ScreenUtil::GetDisplayBoundsInParent(window_state->window());
178 bounds.set_height(bounds.height() - keyboard_bounds.height()); 180 bounds.set_height(bounds.height() - keyboard_bounds.height());
179 181
180 VLOG(1) << "Updating window bounds to: " << bounds.ToString(); 182 VLOG(1) << "Updating window bounds to: " << bounds.ToString();
181 window_state->SetBoundsDirect(bounds); 183 window_state->SetBoundsDirect(bounds);
182 } 184 }
183 185
184 } // namespace ash 186 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698