OLD | NEW |
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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/compositor/layer_animation_observer.h" | 10 #include "ui/compositor/layer_animation_observer.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const gfx::Rect& content_bounds() const { return content_bounds_; } | 47 const gfx::Rect& content_bounds() const { return content_bounds_; } |
48 Style style() const { return style_; } | 48 Style style() const { return style_; } |
49 | 49 |
50 // Moves and resizes the shadow layer to frame |content_bounds|. | 50 // Moves and resizes the shadow layer to frame |content_bounds|. |
51 void SetContentBounds(const gfx::Rect& content_bounds); | 51 void SetContentBounds(const gfx::Rect& content_bounds); |
52 | 52 |
53 // Sets the shadow's style, animating opacity as necessary. | 53 // Sets the shadow's style, animating opacity as necessary. |
54 void SetStyle(Style style); | 54 void SetStyle(Style style); |
55 | 55 |
56 // ui::ImplicitAnimationObserver overrides: | 56 // ui::ImplicitAnimationObserver overrides: |
57 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 57 virtual void OnImplicitAnimationsCompleted() override; |
58 | 58 |
59 private: | 59 private: |
60 // Updates the shadow images to the current |style_|. | 60 // Updates the shadow images to the current |style_|. |
61 void UpdateImagesForStyle(); | 61 void UpdateImagesForStyle(); |
62 | 62 |
63 // Updates the shadow layer bounds based on the inteior inset and the current | 63 // Updates the shadow layer bounds based on the inteior inset and the current |
64 // |content_bounds_|. | 64 // |content_bounds_|. |
65 void UpdateLayerBounds(); | 65 void UpdateLayerBounds(); |
66 | 66 |
67 // The current style, set when the transition animation starts. | 67 // The current style, set when the transition animation starts. |
(...skipping 15 matching lines...) Expand all Loading... |
83 // The interior inset of the shadow images. The content bounds of the image | 83 // The interior inset of the shadow images. The content bounds of the image |
84 // grid should be set to |content_bounds_| inset by this amount. | 84 // grid should be set to |content_bounds_| inset by this amount. |
85 int interior_inset_; | 85 int interior_inset_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(Shadow); | 87 DISALLOW_COPY_AND_ASSIGN(Shadow); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace wm | 90 } // namespace wm |
91 | 91 |
92 #endif // UI_WM_CORE_SHADOW_H_ | 92 #endif // UI_WM_CORE_SHADOW_H_ |
OLD | NEW |