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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "ui/aura/root_window_observer.h" | 13 #include "ui/aura/root_window_observer.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class RootWindow; | 16 class RootWindow; |
17 } | 17 } |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 class Layer; | 20 class Layer; |
21 } | 21 } |
22 | 22 |
23 namespace ash { | 23 namespace ash { |
24 namespace internal { | 24 namespace internal { |
25 | 25 |
26 // ScreenDimmer displays a partially-opaque layer above everything | 26 // ScreenDimmer displays a partially-opaque layer above everything |
27 // else in the root window to darken the monitor. It shouldn't be used | 27 // else in the root window to darken the display. It shouldn't be used |
28 // for long-term brightness adjustments due to performance | 28 // for long-term brightness adjustments due to performance |
29 // considerations -- it's only intended for cases where we want to | 29 // considerations -- it's only intended for cases where we want to |
30 // briefly dim the screen (e.g. to indicate to the user that we're | 30 // briefly dim the screen (e.g. to indicate to the user that we're |
31 // about to suspend a machine that lacks an internal backlight that | 31 // about to suspend a machine that lacks an internal backlight that |
32 // can be adjusted). | 32 // can be adjusted). |
33 class ASH_EXPORT ScreenDimmer : public aura::RootWindowObserver { | 33 class ASH_EXPORT ScreenDimmer : public aura::RootWindowObserver { |
34 public: | 34 public: |
35 class TestApi { | 35 class TestApi { |
36 public: | 36 public: |
37 explicit TestApi(ScreenDimmer* dimmer) : dimmer_(dimmer) {} | 37 explicit TestApi(ScreenDimmer* dimmer) : dimmer_(dimmer) {} |
(...skipping 28 matching lines...) Expand all Loading... |
66 // Are we currently dimming the screen? | 66 // Are we currently dimming the screen? |
67 bool currently_dimming_; | 67 bool currently_dimming_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); | 69 DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace internal | 72 } // namespace internal |
73 } // namespace ash | 73 } // namespace ash |
74 | 74 |
75 #endif // ASH_WM_SCREEN_DIMMER_H_ | 75 #endif // ASH_WM_SCREEN_DIMMER_H_ |
OLD | NEW |