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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_state.cc

Issue 2913433002: [mus+ash] Fixes build by re-landing changes to maximize_mode_window_state (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | 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/maximize_mode/maximize_mode_window_state.h" 5 #include "ash/wm/maximize_mode/maximize_mode_window_state.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
11 #include "ash/shell.h" 11 #include "ash/shell.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/screen_pinning_controller.h" 13 #include "ash/wm/screen_pinning_controller.h"
14 #include "ash/wm/window_animation_types.h" 14 #include "ash/wm/window_animation_types.h"
15 #include "ash/wm/window_properties.h" 15 #include "ash/wm/window_properties.h"
16 #include "ash/wm/window_state_util.h" 16 #include "ash/wm/window_state_util.h"
17 #include "ash/wm/wm_event.h" 17 #include "ash/wm/wm_event.h"
18 #include "ash/wm_window.h"
19 #include "ui/aura/window.h" 18 #include "ui/aura/window.h"
20 #include "ui/aura/window_delegate.h" 19 #include "ui/aura/window_delegate.h"
21 #include "ui/compositor/layer.h" 20 #include "ui/compositor/layer.h"
22 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
23 22
24 namespace ash { 23 namespace ash {
25 namespace { 24 namespace {
26 25
27 // Sets the restore bounds and show state overrides. These values take 26 // Sets the restore bounds and show state overrides. These values take
28 // precedence over the restore bounds and restore show state (if set). 27 // precedence over the restore bounds and restore show state (if set).
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 UpdateBounds(window_state, animated); 299 UpdateBounds(window_state, animated);
301 } 300 }
302 301
303 window_state->NotifyPostStateTypeChange(old_state_type); 302 window_state->NotifyPostStateTypeChange(old_state_type);
304 303
305 if (old_state_type == wm::WINDOW_STATE_TYPE_PINNED || 304 if (old_state_type == wm::WINDOW_STATE_TYPE_PINNED ||
306 target_state == wm::WINDOW_STATE_TYPE_PINNED || 305 target_state == wm::WINDOW_STATE_TYPE_PINNED ||
307 old_state_type == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED || 306 old_state_type == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED ||
308 target_state == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED) { 307 target_state == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED) {
309 Shell::Get()->screen_pinning_controller()->SetPinnedWindow( 308 Shell::Get()->screen_pinning_controller()->SetPinnedWindow(
310 WmWindow::Get(window_state->window())); 309 window_state->window());
311 } 310 }
312 311
313 if ((window_state->window()->layer()->GetTargetVisibility() || 312 if ((window_state->window()->layer()->GetTargetVisibility() ||
314 old_state_type == wm::WINDOW_STATE_TYPE_MINIMIZED) && 313 old_state_type == wm::WINDOW_STATE_TYPE_MINIMIZED) &&
315 !window_state->window()->layer()->visible()) { 314 !window_state->window()->layer()->visible()) {
316 // The layer may be hidden if the window was previously minimized. Make 315 // The layer may be hidden if the window was previously minimized. Make
317 // sure it's visible. 316 // sure it's visible.
318 window_state->window()->Show(); 317 window_state->window()->Show();
319 } 318 }
320 } 319 }
(...skipping 21 matching lines...) Expand all
342 // avoid flashing. 341 // avoid flashing.
343 if (window_state->IsMaximized()) 342 if (window_state->IsMaximized())
344 window_state->SetBoundsDirectCrossFade(bounds_in_parent); 343 window_state->SetBoundsDirectCrossFade(bounds_in_parent);
345 else 344 else
346 window_state->SetBoundsDirectAnimated(bounds_in_parent); 345 window_state->SetBoundsDirectAnimated(bounds_in_parent);
347 } 346 }
348 } 347 }
349 } 348 }
350 349
351 } // namespace ash 350 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698