OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 aura::Window* GetContainer(int container ) { | 48 aura::Window* GetContainer(int container ) { |
49 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 49 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
50 return Shell::GetContainer(root_window, container); | 50 return Shell::GetContainer(root_window, container); |
51 } | 51 } |
52 | 52 |
53 bool IsBackgroundHidden() { | 53 bool IsBackgroundHidden() { |
54 return !GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> | 54 return !GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> |
55 IsVisible(); | 55 IsVisible(); |
56 } | 56 } |
57 | 57 |
58 void ShowBackground() { | |
59 ui::ScopedLayerAnimationSettings settings( | |
60 GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> | |
61 layer()->GetAnimator()); | |
62 settings.SetTransitionDuration(base::TimeDelta()); | |
63 GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->Show(); | |
64 } | |
65 | |
66 void HideBackground() { | 58 void HideBackground() { |
67 ui::ScopedLayerAnimationSettings settings( | 59 ui::ScopedLayerAnimationSettings settings( |
68 GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> | 60 GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)-> |
69 layer()->GetAnimator()); | 61 layer()->GetAnimator()); |
70 settings.SetTransitionDuration(base::TimeDelta()); | 62 settings.SetTransitionDuration(base::TimeDelta()); |
71 GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->Hide(); | 63 GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->Hide(); |
72 } | 64 } |
73 | 65 |
74 } // namespace | 66 } // namespace |
75 | 67 |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 | 1047 |
1056 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); | 1048 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); |
1057 ExpectUnlockAfterUIDestroyedAnimationFinished(); | 1049 ExpectUnlockAfterUIDestroyedAnimationFinished(); |
1058 EXPECT_TRUE(IsBackgroundHidden()); | 1050 EXPECT_TRUE(IsBackgroundHidden()); |
1059 | 1051 |
1060 ExpectUnlockedState(); | 1052 ExpectUnlockedState(); |
1061 } | 1053 } |
1062 | 1054 |
1063 } // namespace test | 1055 } // namespace test |
1064 } // namespace ash | 1056 } // namespace ash |
OLD | NEW |