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

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

Issue 2555373004: Apply new MD shadows to CrOS tray bubbles. (Closed)
Patch Set: fix test for mac 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/views/bubble/tray_bubble_view.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"
11 #include "ui/compositor/layer_animation_observer.h" 11 #include "ui/compositor/layer_animation_observer.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/wm/wm_export.h" 13 #include "ui/wm/wm_export.h"
14 14
15 namespace ui { 15 namespace ui {
16 class Layer; 16 class Layer;
17 } // namespace ui 17 } // namespace ui
18 18
19 namespace wm { 19 namespace wm {
20 20
21 // Simple class that draws a drop shadow around content at given bounds. 21 // Simple class that draws a drop shadow around content at given bounds.
22 class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver { 22 class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver {
23 public: 23 public:
24 // TODO(estade): remove this enum and instead set elevation directly.
24 enum Style { 25 enum Style {
25 // Active windows have more opaque shadows, shifted down to make the window 26 // Active windows have more opaque shadows, shifted down to make the window
26 // appear "higher". 27 // appear "higher".
27 STYLE_ACTIVE, 28 STYLE_ACTIVE,
28 29
29 // Inactive windows have less opaque shadows. 30 // Inactive windows have less opaque shadows.
30 STYLE_INACTIVE, 31 STYLE_INACTIVE,
31 32
32 // Small windows like tooltips and context menus have lighter, smaller 33 // Small windows like tooltips and context menus have lighter, smaller
33 // shadows. 34 // shadows.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 // Bounds of the content that the shadow encloses. 92 // Bounds of the content that the shadow encloses.
92 gfx::Rect content_bounds_; 93 gfx::Rect content_bounds_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(Shadow); 95 DISALLOW_COPY_AND_ASSIGN(Shadow);
95 }; 96 };
96 97
97 } // namespace wm 98 } // namespace wm
98 99
99 #endif // UI_WM_CORE_SHADOW_H_ 100 #endif // UI_WM_CORE_SHADOW_H_
OLDNEW
« no previous file with comments | « ui/views/bubble/tray_bubble_view.cc ('k') | ui/wm/core/shadow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698