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

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

Issue 2550593002: Update WM shadows for MD. (Closed)
Patch Set: fix border for small windows 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
« no previous file with comments | « ui/gfx/shadow_value.cc ('k') | ui/wm/core/shadow.cc » ('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 #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. The elevation is proportional to the size of the blur and
74 // its offset.
75 int ElevationForStyle();
76
72 // The current style, set when the transition animation starts. 77 // The current style, set when the transition animation starts.
73 Style style_; 78 Style style_ = STYLE_ACTIVE;
74 79
75 // The parent layer of the shadow layer. It serves as a container accessible 80 // The parent layer of the shadow layer. It serves as a container accessible
76 // from the outside to control the visibility of the shadow. 81 // from the outside to control the visibility of the shadow.
77 std::unique_ptr<ui::Layer> layer_; 82 std::unique_ptr<ui::Layer> layer_;
78 83
79 // The actual shadow layer corresponding to a cc::NinePatchLayer. 84 // The actual shadow layer corresponding to a cc::NinePatchLayer.
80 std::unique_ptr<ui::Layer> shadow_layer_; 85 std::unique_ptr<ui::Layer> shadow_layer_;
81 86
82 // Size of the current shadow image.
83 gfx::Size image_size_;
84
85 // Bounds of the content that the shadow encloses. 87 // Bounds of the content that the shadow encloses.
86 gfx::Rect content_bounds_; 88 gfx::Rect content_bounds_;
87 89
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); 90 DISALLOW_COPY_AND_ASSIGN(Shadow);
93 }; 91 };
94 92
95 } // namespace wm 93 } // namespace wm
96 94
97 #endif // UI_WM_CORE_SHADOW_H_ 95 #endif // UI_WM_CORE_SHADOW_H_
OLDNEW
« no previous file with comments | « ui/gfx/shadow_value.cc ('k') | ui/wm/core/shadow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698