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

Side by Side Diff: ash/wm/default_state.cc

Issue 2904073002: [mus+ash] Removes WmWindow from ash/wm/screen_pinning_controller.h (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/wm/screen_pinning_controller.h (removes unneeded header) Created 3 years, 7 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 | « ash/shell_observer.h ('k') | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | 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/default_state.h" 5 #include "ash/wm/default_state.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_util.h" 9 #include "ash/screen_util.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 else if (window_state->IsNormalStateType()) 538 else if (window_state->IsNormalStateType())
539 window_state->ClearRestoreBounds(); 539 window_state->ClearRestoreBounds();
540 } 540 }
541 window_state->NotifyPostStateTypeChange(previous_state_type); 541 window_state->NotifyPostStateTypeChange(previous_state_type);
542 542
543 if (next_state_type == WINDOW_STATE_TYPE_PINNED || 543 if (next_state_type == WINDOW_STATE_TYPE_PINNED ||
544 previous_state_type == WINDOW_STATE_TYPE_PINNED || 544 previous_state_type == WINDOW_STATE_TYPE_PINNED ||
545 next_state_type == WINDOW_STATE_TYPE_TRUSTED_PINNED || 545 next_state_type == WINDOW_STATE_TYPE_TRUSTED_PINNED ||
546 previous_state_type == WINDOW_STATE_TYPE_TRUSTED_PINNED) { 546 previous_state_type == WINDOW_STATE_TYPE_TRUSTED_PINNED) {
547 Shell::Get()->screen_pinning_controller()->SetPinnedWindow( 547 Shell::Get()->screen_pinning_controller()->SetPinnedWindow(
548 WmWindow::Get(window_state->window())); 548 window_state->window());
549 } 549 }
550 } 550 }
551 551
552 void DefaultState::ReenterToCurrentState( 552 void DefaultState::ReenterToCurrentState(
553 WindowState* window_state, 553 WindowState* window_state,
554 WindowState::State* state_in_previous_mode) { 554 WindowState::State* state_in_previous_mode) {
555 WindowStateType previous_state_type = state_in_previous_mode->GetType(); 555 WindowStateType previous_state_type = state_in_previous_mode->GetType();
556 556
557 // A state change should not move a window into or out of full screen or 557 // A state change should not move a window into or out of full screen or
558 // pinned since these are "special mode" the user wanted to be in and 558 // pinned since these are "special mode" the user wanted to be in and
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window); 710 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window);
711 center_in_parent.ClampToCenteredSize(window->bounds().size()); 711 center_in_parent.ClampToCenteredSize(window->bounds().size());
712 window_state->SetBoundsDirectAnimated(center_in_parent); 712 window_state->SetBoundsDirectAnimated(center_in_parent);
713 } 713 }
714 // Centering window is treated as if a user moved and resized the window. 714 // Centering window is treated as if a user moved and resized the window.
715 window_state->set_bounds_changed_by_user(true); 715 window_state->set_bounds_changed_by_user(true);
716 } 716 }
717 717
718 } // namespace wm 718 } // namespace wm
719 } // namespace ash 719 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell_observer.h ('k') | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698