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

Side by Side Diff: athena/wm/window_overview_mode.cc

Issue 543443002: Set windows to be fully opaque upon leaving overview mode in Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 "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
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
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
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