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

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

Issue 2852653004: Remove aura::Window::hit_test_bounds_override_inner_ (Closed)
Patch Set: . Created 3 years, 7 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 | ui/aura/window.h » ('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/resize_shadow.h" 5 #include "ash/wm/resize_shadow.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
11 #include "ui/compositor/layer.h" 11 #include "ui/compositor/layer.h"
12 #include "ui/compositor/scoped_layer_animation_settings.h" 12 #include "ui/compositor/scoped_layer_animation_settings.h"
13 #include "ui/gfx/canvas.h" 13 #include "ui/gfx/canvas.h"
14 #include "ui/gfx/geometry/insets.h"
14 #include "ui/gfx/image/canvas_image_source.h" 15 #include "ui/gfx/image/canvas_image_source.h"
15 16
16 namespace { 17 namespace {
17 18
18 // The width of the resize shadow that appears on the hovered edge of the 19 // The width of the resize shadow that appears on the hovered edge of the
19 // window. 20 // window.
20 constexpr int kVisualThickness = 8; 21 constexpr int kVisualThickness = 8;
21 22
22 // The corner radius of the resize shadow, which not coincidentally matches 23 // The corner radius of the resize shadow, which not coincidentally matches
23 // the corner radius of the actual window. 24 // the corner radius of the actual window.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 constexpr int kShadowFadeOutDurationMs = 100; 159 constexpr int kShadowFadeOutDurationMs = 100;
159 settings.SetTransitionDuration( 160 settings.SetTransitionDuration(
160 base::TimeDelta::FromMilliseconds(kShadowFadeOutDurationMs)); 161 base::TimeDelta::FromMilliseconds(kShadowFadeOutDurationMs));
161 } 162 }
162 constexpr float kShadowTargetOpacity = 0.5f; 163 constexpr float kShadowTargetOpacity = 0.5f;
163 layer_->SetOpacity(visible ? kShadowTargetOpacity : 0.f); 164 layer_->SetOpacity(visible ? kShadowTargetOpacity : 0.f);
164 layer_->SetVisible(visible); 165 layer_->SetVisible(visible);
165 } 166 }
166 167
167 } // namespace ash 168 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698