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

Side by Side Diff: ash/common/wm/overview/window_grid.cc

Issue 2278903003: [ash-md] Keeps overview mode shield above DesktopBackgroundView (Closed)
Patch Set: Created 4 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
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/common/wm/overview/window_grid.h" 5 #include "ash/common/wm/overview/window_grid.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 ->GetBackgroundType() == SHELF_BACKGROUND_MAXIMIZED) 846 ->GetBackgroundType() == SHELF_BACKGROUND_MAXIMIZED)
847 ? 1.f 847 ? 1.f
848 : 0.f; 848 : 0.f;
849 shield_widget_.reset(CreateBackgroundWidget( 849 shield_widget_.reset(CreateBackgroundWidget(
850 root_window_, kShieldColor, 0, 0, SK_ColorTRANSPARENT, initial_opacity)); 850 root_window_, kShieldColor, 0, 0, SK_ColorTRANSPARENT, initial_opacity));
851 851
852 WmWindow* widget_window = 852 WmWindow* widget_window =
853 WmLookup::Get()->GetWindowForWidget(shield_widget_.get()); 853 WmLookup::Get()->GetWindowForWidget(shield_widget_.get());
854 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); 854 const gfx::Rect bounds = widget_window->GetParent()->GetBounds();
855 widget_window->SetBounds(bounds); 855 widget_window->SetBounds(bounds);
856 widget_window->SetName("overview-mode-shield");
James Cook 2016/08/25 18:32:12 nit: I usually use OverviewModeShield for these na
varkha 2016/08/25 19:56:42 Done. Here and for other overview mode widgets.
856 857
857 ui::ScopedLayerAnimationSettings animation_settings( 858 ui::ScopedLayerAnimationSettings animation_settings(
858 widget_window->GetLayer()->GetAnimator()); 859 widget_window->GetLayer()->GetAnimator());
859 animation_settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 860 animation_settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
860 kOverviewSelectorTransitionMilliseconds)); 861 kOverviewSelectorTransitionMilliseconds));
861 animation_settings.SetTweenType(gfx::Tween::LINEAR_OUT_SLOW_IN); 862 animation_settings.SetTweenType(gfx::Tween::LINEAR_OUT_SLOW_IN);
862 animation_settings.SetPreemptionStrategy( 863 animation_settings.SetPreemptionStrategy(
863 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 864 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
864 shield_widget_->SetOpacity(kShieldOpacity); 865 shield_widget_->SetOpacity(kShieldOpacity);
865 } 866 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 *min_right = left; 1052 *min_right = left;
1052 if (*max_right < left) 1053 if (*max_right < left)
1053 *max_right = left; 1054 *max_right = left;
1054 } 1055 }
1055 *max_bottom = top + height; 1056 *max_bottom = top + height;
1056 } 1057 }
1057 return windows_fit; 1058 return windows_fit;
1058 } 1059 }
1059 1060
1060 } // namespace ash 1061 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/desktop_background/desktop_background_view.cc » ('j') | ash/desktop_background/desktop_background_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698