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_SCREEN_DIMMER_H_ | 5 #ifndef ASH_WM_SCREEN_DIMMER_H_ |
6 #define ASH_WM_SCREEN_DIMMER_H_ | 6 #define ASH_WM_SCREEN_DIMMER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/shell_observer.h" | 9 #include "ash/shell_observer.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Find a ScreenDimmer in the container, or nullptr if it does not exist. | 47 // Find a ScreenDimmer in the container, or nullptr if it does not exist. |
48 static ScreenDimmer* FindForTest(int container_id); | 48 static ScreenDimmer* FindForTest(int container_id); |
49 | 49 |
50 private: | 50 private: |
51 static aura::Window* FindContainer(int container_id); | 51 static aura::Window* FindContainer(int container_id); |
52 | 52 |
53 explicit ScreenDimmer(int container_id); | 53 explicit ScreenDimmer(int container_id); |
54 | 54 |
55 // ShellObserver: | 55 // ShellObserver: |
56 void OnRootWindowAdded(aura::Window* root_window) override; | 56 void OnRootWindowAdded(WmWindow* root_window) override; |
57 | 57 |
58 // Update the dimming state. This will also create a new DimWindow | 58 // Update the dimming state. This will also create a new DimWindow |
59 // if necessary. (Used when a new display is connected) | 59 // if necessary. (Used when a new display is connected) |
60 void Update(bool should_dim); | 60 void Update(bool should_dim); |
61 | 61 |
62 int container_id_; | 62 int container_id_; |
63 float target_opacity_; | 63 float target_opacity_; |
64 | 64 |
65 // Are we currently dimming the screen? | 65 // Are we currently dimming the screen? |
66 bool is_dimming_; | 66 bool is_dimming_; |
67 bool at_bottom_; | 67 bool at_bottom_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); | 69 DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace ash | 72 } // namespace ash |
73 | 73 |
74 #endif // ASH_WM_SCREEN_DIMMER_H_ | 74 #endif // ASH_WM_SCREEN_DIMMER_H_ |
OLD | NEW |