| 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" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 break; | 136 break; |
| 137 case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION: | 137 case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION: |
| 138 case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE: | 138 case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE: |
| 139 case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE: | 139 case wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE: |
| 140 case wm::WM_EVENT_TOGGLE_MAXIMIZE: | 140 case wm::WM_EVENT_TOGGLE_MAXIMIZE: |
| 141 case wm::WM_EVENT_CENTER: | 141 case wm::WM_EVENT_CENTER: |
| 142 case wm::WM_EVENT_SNAP_LEFT: | 142 case wm::WM_EVENT_SNAP_LEFT: |
| 143 case wm::WM_EVENT_SNAP_RIGHT: | 143 case wm::WM_EVENT_SNAP_RIGHT: |
| 144 case wm::WM_EVENT_NORMAL: | 144 case wm::WM_EVENT_NORMAL: |
| 145 case wm::WM_EVENT_MAXIMIZE: | 145 case wm::WM_EVENT_MAXIMIZE: |
| 146 case wm::WM_EVENT_DOCK: |
| 146 UpdateWindow(window_state, | 147 UpdateWindow(window_state, |
| 147 GetMaximizedOrCenteredWindowType(window_state), | 148 GetMaximizedOrCenteredWindowType(window_state), |
| 148 true); | 149 true); |
| 149 return; | 150 return; |
| 150 case wm::WM_EVENT_MINIMIZE: | 151 case wm::WM_EVENT_MINIMIZE: |
| 151 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED, true); | 152 UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_MINIMIZED, true); |
| 152 return; | 153 return; |
| 153 case wm::WM_EVENT_SHOW_INACTIVE: | 154 case wm::WM_EVENT_SHOW_INACTIVE: |
| 154 return; | 155 return; |
| 155 case wm::WM_EVENT_SET_BOUNDS: | 156 case wm::WM_EVENT_SET_BOUNDS: |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // avoid flashing. | 308 // avoid flashing. |
| 308 if (window_state->IsMaximized()) | 309 if (window_state->IsMaximized()) |
| 309 window_state->SetBoundsDirectCrossFade(bounds_in_parent); | 310 window_state->SetBoundsDirectCrossFade(bounds_in_parent); |
| 310 else | 311 else |
| 311 window_state->SetBoundsDirectAnimated(bounds_in_parent); | 312 window_state->SetBoundsDirectAnimated(bounds_in_parent); |
| 312 } | 313 } |
| 313 } | 314 } |
| 314 } | 315 } |
| 315 | 316 |
| 316 } // namespace ash | 317 } // namespace ash |
| OLD | NEW |