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

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

Issue 2825613002: Update ash phantom window aesthetics. (Closed)
Patch Set: solid color layer Created 3 years, 8 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
« no previous file with comments | « ash/wm/workspace/phantom_window_controller.cc ('k') | ui/wm/core/shadow_controller.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_CONTROLLER_H_ 5 #ifndef UI_WM_CORE_SHADOW_CONTROLLER_H_
6 #define UI_WM_CORE_SHADOW_CONTROLLER_H_ 6 #define UI_WM_CORE_SHADOW_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "ui/wm/core/shadow_types.h"
13 #include "ui/wm/public/activation_change_observer.h" 14 #include "ui/wm/public/activation_change_observer.h"
14 #include "ui/wm/wm_export.h" 15 #include "ui/wm/wm_export.h"
15 16
16 namespace aura { 17 namespace aura {
17 class Window; 18 class Window;
18 namespace client { 19 namespace client {
19 class ActivationClient; 20 class ActivationClient;
20 } 21 }
21 } 22 }
22 23
23 namespace wm { 24 namespace wm {
24 25
25 class Shadow; 26 class Shadow;
26 27
27 // ShadowController observes changes to windows and creates and updates drop 28 // ShadowController observes changes to windows and creates and updates drop
28 // shadows as needed. ShadowController itself is light weight and per 29 // shadows as needed. ShadowController itself is light weight and per
29 // ActivationClient. ShadowController delegates to its implementation class, 30 // ActivationClient. ShadowController delegates to its implementation class,
30 // which observes all window creation. 31 // which observes all window creation.
31 class WM_EXPORT ShadowController : 32 class WM_EXPORT ShadowController :
32 public aura::client::ActivationChangeObserver { 33 public aura::client::ActivationChangeObserver {
33 public: 34 public:
35 static constexpr ShadowElevation kActiveNormalShadowElevation =
36 ShadowElevation::LARGE;
37
34 // Returns the shadow for the |window|, or NULL if no shadow exists. 38 // Returns the shadow for the |window|, or NULL if no shadow exists.
35 static Shadow* GetShadowForWindow(aura::Window* window); 39 static Shadow* GetShadowForWindow(aura::Window* window);
36 40
37 explicit ShadowController(aura::client::ActivationClient* activation_client); 41 explicit ShadowController(aura::client::ActivationClient* activation_client);
38 ~ShadowController() override; 42 ~ShadowController() override;
39 43
40 // aura::client::ActivationChangeObserver overrides: 44 // aura::client::ActivationChangeObserver overrides:
41 void OnWindowActivated( 45 void OnWindowActivated(
42 aura::client::ActivationChangeObserver::ActivationReason reason, 46 aura::client::ActivationChangeObserver::ActivationReason reason,
43 aura::Window* gained_active, 47 aura::Window* gained_active,
44 aura::Window* lost_active) override; 48 aura::Window* lost_active) override;
45 49
46 private: 50 private:
47 class Impl; 51 class Impl;
48 52
49 aura::client::ActivationClient* activation_client_; 53 aura::client::ActivationClient* activation_client_;
50 54
51 scoped_refptr<Impl> impl_; 55 scoped_refptr<Impl> impl_;
52 56
53 DISALLOW_COPY_AND_ASSIGN(ShadowController); 57 DISALLOW_COPY_AND_ASSIGN(ShadowController);
54 }; 58 };
55 59
56 } // namespace wm 60 } // namespace wm
57 61
58 #endif // UI_WM_CORE_SHADOW_CONTROLLER_H_ 62 #endif // UI_WM_CORE_SHADOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/phantom_window_controller.cc ('k') | ui/wm/core/shadow_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698