| Index: ash/wm/screen_dimmer.h
|
| diff --git a/ash/wm/screen_dimmer.h b/ash/wm/screen_dimmer.h
|
| index 40c1c4ca200ed39b4cf9c211c4802f3501b01e2e..d752e92ce48ac7de2d2252e902bcfcfc77f16cf1 100644
|
| --- a/ash/wm/screen_dimmer.h
|
| +++ b/ash/wm/screen_dimmer.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef ASH_WM_SCREEN_DIMMER_H_
|
| #define ASH_WM_SCREEN_DIMMER_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "ash/ash_export.h"
|
| #include "ash/common/shell_observer.h"
|
| #include "base/compiler_specific.h"
|
| @@ -16,7 +18,14 @@ class Layer;
|
| }
|
|
|
| namespace ash {
|
| -class DimWindow;
|
| +namespace test {
|
| +class ScreenDimmerTest;
|
| +}
|
| +
|
| +class WindowDimmer;
|
| +
|
| +template <typename UserData>
|
| +class WmWindowUserData;
|
|
|
| // ScreenDimmer displays a partially-opaque layer above everything
|
| // else in the given container window to darken the display. It shouldn't be
|
| @@ -25,7 +34,7 @@ class DimWindow;
|
| // briefly dim the screen (e.g. to indicate to the user that we're
|
| // about to suspend a machine that lacks an internal backlight that
|
| // can be adjusted).
|
| -class ASH_EXPORT ScreenDimmer : ShellObserver {
|
| +class ASH_EXPORT ScreenDimmer : public ShellObserver {
|
| public:
|
| // Creates a screen dimmer for the containers given by |container_id|.
|
| // It's owned by the container in the primary root window and will be
|
| @@ -48,10 +57,12 @@ class ASH_EXPORT ScreenDimmer : ShellObserver {
|
| static ScreenDimmer* FindForTest(int container_id);
|
|
|
| private:
|
| - static aura::Window* FindContainer(int container_id);
|
| + friend class test::ScreenDimmerTest;
|
|
|
| explicit ScreenDimmer(int container_id);
|
|
|
| + static aura::Window* FindContainer(int container_id);
|
| +
|
| // ShellObserver:
|
| void OnRootWindowAdded(WmWindow* root_window) override;
|
|
|
| @@ -66,6 +77,9 @@ class ASH_EXPORT ScreenDimmer : ShellObserver {
|
| bool is_dimming_;
|
| bool at_bottom_;
|
|
|
| + // Owns the WindowDimmers.
|
| + std::unique_ptr<WmWindowUserData<WindowDimmer>> window_dimmers_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ScreenDimmer);
|
| };
|
|
|
|
|