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

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

Issue 412643002: Hide shadow layer when border exceeds layer bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate the shadow layer associated with NinePatchLayer from the container parent layer. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 "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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
68 Style style_; 68 Style style_;
69 69
70 // The parent layer of the shadow layer. It serves as a container accessible
71 // from the outside to control the visibility of the shadow.
70 scoped_ptr<ui::Layer> layer_; 72 scoped_ptr<ui::Layer> layer_;
71 73
74 // The actual shadow layer corresponding to a cc::NinePatchLayer.
75 scoped_ptr<ui::Layer> shadow_layer_;
76
72 // Bounds of the content that the shadow encloses. 77 // Bounds of the content that the shadow encloses.
73 gfx::Rect content_bounds_; 78 gfx::Rect content_bounds_;
74 79
75 // The interior inset of the shadow images. The content bounds of the image 80 // The interior inset of the shadow images. The content bounds of the image
76 // grid should be set to |content_bounds_| inset by this amount. 81 // grid should be set to |content_bounds_| inset by this amount.
77 int interior_inset_; 82 int interior_inset_;
78 83
79 DISALLOW_COPY_AND_ASSIGN(Shadow); 84 DISALLOW_COPY_AND_ASSIGN(Shadow);
80 }; 85 };
81 86
82 } // namespace wm 87 } // namespace wm
83 88
84 #endif // UI_WM_CORE_SHADOW_H_ 89 #endif // UI_WM_CORE_SHADOW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/wm/core/shadow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698