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 ASH_WM_SHADOW_H_ | 5 #ifndef ASH_WM_SHADOW_H_ |
6 #define ASH_WM_SHADOW_H_ | 6 #define ASH_WM_SHADOW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "ash/ash_export.h" | 12 #include "ui/compositor/layer_animation_observer.h" |
12 #include "ui/gfx/compositor/layer_animation_observer.h" | |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class Window; | 16 class Window; |
17 } // namespace aura | 17 } // namespace aura |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 class Layer; | 20 class Layer; |
21 } // namespace ui | 21 } // namespace ui |
22 | 22 |
(...skipping 17 matching lines...) Expand all Loading... |
40 // shadows. | 40 // shadows. |
41 STYLE_SMALL, | 41 STYLE_SMALL, |
42 }; | 42 }; |
43 | 43 |
44 Shadow(); | 44 Shadow(); |
45 virtual ~Shadow(); | 45 virtual ~Shadow(); |
46 | 46 |
47 // |window| is a possibly-arbitrary window that is drawn at the same DPI | 47 // |window| is a possibly-arbitrary window that is drawn at the same DPI |
48 // (i.e. on the same monitor) as this shadow. The actual bounds for the | 48 // (i.e. on the same monitor) as this shadow. The actual bounds for the |
49 // shadow still has to be provided through |SetContentBounds()|. | 49 // shadow still has to be provided through |SetContentBounds()|. |
50 // TODO(oshima): move scale factor to gfx/compositor and remove this. | 50 // TODO(oshima): move scale factor to ui/compositor/ and remove this. |
51 void Init(aura::Window* window, Style style); | 51 void Init(aura::Window* window, Style style); |
52 | 52 |
53 // Returns |image_grid_|'s ui::Layer. This is exposed so it can be added to | 53 // Returns |image_grid_|'s ui::Layer. This is exposed so it can be added to |
54 // the same layer as the content and stacked below it. SetContentBounds() | 54 // the same layer as the content and stacked below it. SetContentBounds() |
55 // should be used to adjust the shadow's size and position (rather than | 55 // should be used to adjust the shadow's size and position (rather than |
56 // applying transformations to this layer). | 56 // applying transformations to this layer). |
57 ui::Layer* layer() const; | 57 ui::Layer* layer() const; |
58 | 58 |
59 const gfx::Rect& content_bounds() const { return content_bounds_; } | 59 const gfx::Rect& content_bounds() const { return content_bounds_; } |
60 Style style() const { return style_; } | 60 Style style() const { return style_; } |
(...skipping 23 matching lines...) Expand all Loading... |
84 // Bounds of the content that the shadow encloses. | 84 // Bounds of the content that the shadow encloses. |
85 gfx::Rect content_bounds_; | 85 gfx::Rect content_bounds_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(Shadow); | 87 DISALLOW_COPY_AND_ASSIGN(Shadow); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace internal | 90 } // namespace internal |
91 } // namespace ash | 91 } // namespace ash |
92 | 92 |
93 #endif // ASH_WM_SHADOW_H_ | 93 #endif // ASH_WM_SHADOW_H_ |
OLD | NEW |