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

Side by Side Diff: ui/wm/core/shadow.h

Issue 2550593002: Update WM shadows for MD. (Closed)
Patch Set: fix corners Created 4 years 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 (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 #ifndef UI_WM_CORE_SHADOW_H_ 5 #ifndef UI_WM_CORE_SHADOW_H_
6 #define UI_WM_CORE_SHADOW_H_ 6 #define UI_WM_CORE_SHADOW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void OnImplicitAnimationsCompleted() override; 62 void OnImplicitAnimationsCompleted() override;
63 63
64 private: 64 private:
65 // Updates the shadow images to the current |style_|. 65 // Updates the shadow images to the current |style_|.
66 void UpdateImagesForStyle(); 66 void UpdateImagesForStyle();
67 67
68 // Updates the shadow layer bounds based on the inteior inset and the current 68 // Updates the shadow layer bounds based on the inteior inset and the current
69 // |content_bounds_|. 69 // |content_bounds_|.
70 void UpdateLayerBounds(); 70 void UpdateLayerBounds();
71 71
72 // Returns the "elevation" for |style_|, which dictates the shadow's display
73 // characteristics.
James Cook 2016/12/05 23:38:35 nit: Document that elevation currently means size
Evan Stade 2016/12/06 00:53:21 Done.
74 int ElevationForStyle();
75
72 // The current style, set when the transition animation starts. 76 // The current style, set when the transition animation starts.
73 Style style_; 77 Style style_;
74 78
75 // The parent layer of the shadow layer. It serves as a container accessible 79 // The parent layer of the shadow layer. It serves as a container accessible
76 // from the outside to control the visibility of the shadow. 80 // from the outside to control the visibility of the shadow.
77 std::unique_ptr<ui::Layer> layer_; 81 std::unique_ptr<ui::Layer> layer_;
78 82
79 // The actual shadow layer corresponding to a cc::NinePatchLayer. 83 // The actual shadow layer corresponding to a cc::NinePatchLayer.
80 std::unique_ptr<ui::Layer> shadow_layer_; 84 std::unique_ptr<ui::Layer> shadow_layer_;
81 85
82 // Size of the current shadow image.
83 gfx::Size image_size_;
84
85 // Bounds of the content that the shadow encloses. 86 // Bounds of the content that the shadow encloses.
86 gfx::Rect content_bounds_; 87 gfx::Rect content_bounds_;
87 88
88 // The interior inset of the shadow images. The content bounds of the image
89 // grid should be set to |content_bounds_| inset by this amount.
90 int interior_inset_;
91
92 DISALLOW_COPY_AND_ASSIGN(Shadow); 89 DISALLOW_COPY_AND_ASSIGN(Shadow);
93 }; 90 };
94 91
95 } // namespace wm 92 } // namespace wm
96 93
97 #endif // UI_WM_CORE_SHADOW_H_ 94 #endif // UI_WM_CORE_SHADOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698