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

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

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/session_state_animator.cc ('k') | ash/wm/toplevel_window_event_handler.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/session_state_controller_impl2.h" 5 #include "ash/wm/session_state_controller_impl2.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/cancel_mode.h" 8 #include "ash/cancel_mode.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 internal::SessionStateAnimator::ANIMATION_FADE_IN, 580 internal::SessionStateAnimator::ANIMATION_FADE_IN,
581 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, 581 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
582 observer); 582 observer);
583 AnimateBackgroundHidingIfNecessary( 583 AnimateBackgroundHidingIfNecessary(
584 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, 584 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
585 observer); 585 observer);
586 observer->Unpause(); 586 observer->Unpause();
587 } 587 }
588 588
589 void SessionStateControllerImpl2::StoreUnlockedProperties() { 589 void SessionStateControllerImpl2::StoreUnlockedProperties() {
590 if (!unlocked_properties_.get()) { 590 if (!unlocked_properties_) {
591 unlocked_properties_.reset(new UnlockedStateProperties()); 591 unlocked_properties_.reset(new UnlockedStateProperties());
592 unlocked_properties_->background_is_hidden = IsBackgroundHidden(); 592 unlocked_properties_->background_is_hidden = IsBackgroundHidden();
593 } 593 }
594 if (unlocked_properties_->background_is_hidden) { 594 if (unlocked_properties_->background_is_hidden) {
595 // Hide background so that it can be animated later. 595 // Hide background so that it can be animated later.
596 animator_->StartAnimation( 596 animator_->StartAnimation(
597 internal::SessionStateAnimator::DESKTOP_BACKGROUND, 597 internal::SessionStateAnimator::DESKTOP_BACKGROUND,
598 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, 598 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
599 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); 599 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
600 ShowBackground(); 600 ShowBackground();
601 } 601 }
602 } 602 }
603 603
604 void SessionStateControllerImpl2::RestoreUnlockedProperties() { 604 void SessionStateControllerImpl2::RestoreUnlockedProperties() {
605 if (!unlocked_properties_.get()) 605 if (!unlocked_properties_)
606 return; 606 return;
607 if (unlocked_properties_->background_is_hidden) { 607 if (unlocked_properties_->background_is_hidden) {
608 HideBackground(); 608 HideBackground();
609 // Restore background visibility. 609 // Restore background visibility.
610 animator_->StartAnimation( 610 animator_->StartAnimation(
611 internal::SessionStateAnimator::DESKTOP_BACKGROUND, 611 internal::SessionStateAnimator::DESKTOP_BACKGROUND,
612 internal::SessionStateAnimator::ANIMATION_FADE_IN, 612 internal::SessionStateAnimator::ANIMATION_FADE_IN,
613 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); 613 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
614 } 614 }
615 unlocked_properties_.reset(); 615 unlocked_properties_.reset();
(...skipping 19 matching lines...) Expand all
635 unlocked_properties_->background_is_hidden) { 635 unlocked_properties_->background_is_hidden) {
636 animator_->StartAnimationWithObserver( 636 animator_->StartAnimationWithObserver(
637 internal::SessionStateAnimator::DESKTOP_BACKGROUND, 637 internal::SessionStateAnimator::DESKTOP_BACKGROUND,
638 internal::SessionStateAnimator::ANIMATION_FADE_OUT, 638 internal::SessionStateAnimator::ANIMATION_FADE_OUT,
639 speed, 639 speed,
640 observer); 640 observer);
641 } 641 }
642 } 642 }
643 643
644 } // namespace ash 644 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/session_state_animator.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698