OLD | NEW |
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/maximize_mode/maximize_mode_window_state.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
11 #include "ash/wm/coordinate_conversion.h" | 11 #include "ash/wm/coordinate_conversion.h" |
12 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 12 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
13 #include "ash/wm/window_animations.h" | 13 #include "ash/wm/window_animations.h" |
14 #include "ash/wm/window_state.h" | 14 #include "ash/wm/window_state.h" |
15 #include "ash/wm/window_state_delegate.h" | 15 #include "ash/wm/window_state_delegate.h" |
16 #include "ash/wm/window_util.h" | 16 #include "ash/wm/window_util.h" |
17 #include "ash/wm/wm_event.h" | 17 #include "ash/wm/wm_event.h" |
18 #include "ash/wm/workspace/workspace_window_resizer.h" | 18 #include "ash/wm/workspace/workspace_window_resizer.h" |
19 #include "ui/aura/client/aura_constants.h" | 19 #include "ui/aura/client/aura_constants.h" |
20 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
21 #include "ui/aura/window_delegate.h" | 21 #include "ui/aura/window_delegate.h" |
22 #include "ui/gfx/display.h" | 22 #include "ui/gfx/display.h" |
23 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
24 | 24 |
25 namespace ash { | 25 namespace ash { |
26 namespace internal { | |
27 namespace { | 26 namespace { |
28 | 27 |
29 // Returns the biggest possible size for a window which is about to be | 28 // Returns the biggest possible size for a window which is about to be |
30 // maximized. | 29 // maximized. |
31 gfx::Size GetMaximumSizeOfWindow(wm::WindowState* window_state) { | 30 gfx::Size GetMaximumSizeOfWindow(wm::WindowState* window_state) { |
32 DCHECK(window_state->CanMaximize()); | 31 DCHECK(window_state->CanMaximize()); |
33 | 32 |
34 gfx::Size workspace_size = ScreenUtil::GetMaximizedWindowBoundsInParent( | 33 gfx::Size workspace_size = ScreenUtil::GetMaximizedWindowBoundsInParent( |
35 window_state->window()).size(); | 34 window_state->window()).size(); |
36 | 35 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 215 |
217 if ((window_state->window()->TargetVisibility() || | 216 if ((window_state->window()->TargetVisibility() || |
218 old_state_type == wm::WINDOW_STATE_TYPE_MINIMIZED) && | 217 old_state_type == wm::WINDOW_STATE_TYPE_MINIMIZED) && |
219 !window_state->window()->layer()->visible()) { | 218 !window_state->window()->layer()->visible()) { |
220 // The layer may be hidden if the window was previously minimized. Make | 219 // The layer may be hidden if the window was previously minimized. Make |
221 // sure it's visible. | 220 // sure it's visible. |
222 window_state->window()->Show(); | 221 window_state->window()->Show(); |
223 } | 222 } |
224 } | 223 } |
225 | 224 |
226 } // namespace internal | |
227 } // namespace ash | 225 } // namespace ash |
OLD | NEW |