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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 case wm::WM_EVENT_ADDED_TO_WORKSPACE: | 169 case wm::WM_EVENT_ADDED_TO_WORKSPACE: |
170 if (current_state_type_ != wm::WINDOW_STATE_TYPE_MAXIMIZED && | 170 if (current_state_type_ != wm::WINDOW_STATE_TYPE_MAXIMIZED && |
171 current_state_type_ != wm::WINDOW_STATE_TYPE_FULLSCREEN && | 171 current_state_type_ != wm::WINDOW_STATE_TYPE_FULLSCREEN && |
172 current_state_type_ != wm::WINDOW_STATE_TYPE_MINIMIZED) { | 172 current_state_type_ != wm::WINDOW_STATE_TYPE_MINIMIZED) { |
173 wm::WindowStateType new_state = | 173 wm::WindowStateType new_state = |
174 GetMaximizedOrCenteredWindowType(window_state); | 174 GetMaximizedOrCenteredWindowType(window_state); |
175 UpdateWindow(window_state, new_state, true); | 175 UpdateWindow(window_state, new_state, true); |
176 } | 176 } |
177 break; | 177 break; |
178 case wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED: | 178 case wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED: |
179 if (current_state_type_ != wm::WINDOW_STATE_TYPE_MINIMIZED) | |
180 UpdateBounds(window_state, true); | |
181 break; | |
179 case wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED: | 182 case wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED: |
180 if (current_state_type_ != wm::WINDOW_STATE_TYPE_MINIMIZED) | 183 if (current_state_type_ != wm::WINDOW_STATE_TYPE_MINIMIZED) |
181 UpdateBounds(window_state, true); | 184 UpdateBounds(window_state, false); |
flackr
2014/05/26 21:42:36
Maybe add a quick comment as to why we don't want
| |
182 break; | 185 break; |
183 } | 186 } |
184 } | 187 } |
185 | 188 |
186 wm::WindowStateType MaximizeModeWindowState::GetType() const { | 189 wm::WindowStateType MaximizeModeWindowState::GetType() const { |
187 return current_state_type_; | 190 return current_state_type_; |
188 } | 191 } |
189 | 192 |
190 void MaximizeModeWindowState::AttachState( | 193 void MaximizeModeWindowState::AttachState( |
191 wm::WindowState* window_state, | 194 wm::WindowState* window_state, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 // avoid flashing. | 293 // avoid flashing. |
291 if (window_state->IsMaximized()) | 294 if (window_state->IsMaximized()) |
292 window_state->SetBoundsDirectCrossFade(bounds_in_parent); | 295 window_state->SetBoundsDirectCrossFade(bounds_in_parent); |
293 else | 296 else |
294 window_state->SetBoundsDirectAnimated(bounds_in_parent); | 297 window_state->SetBoundsDirectAnimated(bounds_in_parent); |
295 } | 298 } |
296 } | 299 } |
297 } | 300 } |
298 | 301 |
299 } // namespace ash | 302 } // namespace ash |
OLD | NEW |