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 "athena/wm/window_overview_mode.h" | 5 #include "athena/wm/window_overview_mode.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator()); | 89 ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator()); |
90 settings.SetPreemptionStrategy( | 90 settings.SetPreemptionStrategy( |
91 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 91 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
92 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(250)); | 92 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(250)); |
93 | 93 |
94 settings.AddObserver(new ui::ClosureAnimationObserver( | 94 settings.AddObserver(new ui::ClosureAnimationObserver( |
95 base::Bind(&HideWindowIfNotVisible, window, split_view_controller))); | 95 base::Bind(&HideWindowIfNotVisible, window, split_view_controller))); |
96 | 96 |
97 window->SetTransform(gfx::Transform()); | 97 window->SetTransform(gfx::Transform()); |
| 98 |
| 99 // Reset the window opacity in case the user is dragging a window. |
| 100 window->layer()->SetOpacity(1.0f); |
| 101 |
98 wm::SetShadowType(window, wm::SHADOW_TYPE_NONE); | 102 wm::SetShadowType(window, wm::SHADOW_TYPE_NONE); |
99 } | 103 } |
100 | 104 |
101 // Always returns the same target. | 105 // Always returns the same target. |
102 class StaticWindowTargeter : public aura::WindowTargeter { | 106 class StaticWindowTargeter : public aura::WindowTargeter { |
103 public: | 107 public: |
104 explicit StaticWindowTargeter(aura::Window* target) : target_(target) {} | 108 explicit StaticWindowTargeter(aura::Window* target) : target_(target) {} |
105 virtual ~StaticWindowTargeter() {} | 109 virtual ~StaticWindowTargeter() {} |
106 | 110 |
107 private: | 111 private: |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 aura::Window* container, | 614 aura::Window* container, |
611 const WindowListProvider* window_list_provider, | 615 const WindowListProvider* window_list_provider, |
612 SplitViewController* split_view_controller, | 616 SplitViewController* split_view_controller, |
613 WindowOverviewModeDelegate* delegate) { | 617 WindowOverviewModeDelegate* delegate) { |
614 return scoped_ptr<WindowOverviewMode>( | 618 return scoped_ptr<WindowOverviewMode>( |
615 new WindowOverviewModeImpl(container, window_list_provider, | 619 new WindowOverviewModeImpl(container, window_list_provider, |
616 split_view_controller, delegate)); | 620 split_view_controller, delegate)); |
617 } | 621 } |
618 | 622 |
619 } // namespace athena | 623 } // namespace athena |
OLD | NEW |