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_POWER_BUTTON_CONTROLLER_H_ | 5 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "ui/aura/root_window_observer.h" | 15 #include "ui/aura/root_window_observer.h" |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
| 18 class Rect; |
18 class Size; | 19 class Size; |
19 } | 20 } |
20 | 21 |
21 namespace ui { | 22 namespace ui { |
22 class Layer; | 23 class Layer; |
23 } | 24 } |
24 | 25 |
25 namespace ash { | 26 namespace ash { |
26 | 27 |
27 // Performs system-related functions on behalf of PowerButtonController. | 28 // Performs system-related functions on behalf of PowerButtonController. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 114 } |
114 | 115 |
115 // Returns true if the given set of containers was last animated with | 116 // Returns true if the given set of containers was last animated with |
116 // |type| (probably; the analysis is fairly ad-hoc). | 117 // |type| (probably; the analysis is fairly ad-hoc). |
117 bool ContainerGroupIsAnimated(ContainerGroup group, | 118 bool ContainerGroupIsAnimated(ContainerGroup group, |
118 AnimationType type) const; | 119 AnimationType type) const; |
119 | 120 |
120 // Returns true if |background_layer_| is non-NULL and visible. | 121 // Returns true if |background_layer_| is non-NULL and visible. |
121 bool BackgroundLayerIsVisible() const; | 122 bool BackgroundLayerIsVisible() const; |
122 | 123 |
| 124 // Returns |background_layer_|'s bounds, or an empty rect if the layer is |
| 125 // NULL. |
| 126 gfx::Rect GetBackgroundLayerBounds() const; |
| 127 |
123 private: | 128 private: |
124 PowerButtonController* controller_; // not owned | 129 PowerButtonController* controller_; // not owned |
125 | 130 |
126 DISALLOW_COPY_AND_ASSIGN(TestApi); | 131 DISALLOW_COPY_AND_ASSIGN(TestApi); |
127 }; | 132 }; |
128 | 133 |
129 PowerButtonController(); | 134 PowerButtonController(); |
130 virtual ~PowerButtonController(); | 135 virtual ~PowerButtonController(); |
131 | 136 |
132 void set_delegate(PowerButtonControllerDelegate* delegate) { | 137 void set_delegate(PowerButtonControllerDelegate* delegate) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // |background_layer_|, as the desktop background is now covering the whole | 248 // |background_layer_|, as the desktop background is now covering the whole |
244 // screen. | 249 // screen. |
245 base::OneShotTimer<PowerButtonController> hide_background_layer_timer_; | 250 base::OneShotTimer<PowerButtonController> hide_background_layer_timer_; |
246 | 251 |
247 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); | 252 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); |
248 }; | 253 }; |
249 | 254 |
250 } // namespace ash | 255 } // namespace ash |
251 | 256 |
252 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 257 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
OLD | NEW |