| Index: ash/wm/screen_dimmer.h
|
| diff --git a/ash/wm/screen_dimmer.h b/ash/wm/screen_dimmer.h
|
| index 364de4e586766fef972d7c4dd534fba8388e327c..90064bfe4dcc03ff9fc36be12e9964d28a3b0b82 100644
|
| --- a/ash/wm/screen_dimmer.h
|
| +++ b/ash/wm/screen_dimmer.h
|
| @@ -6,16 +6,11 @@
|
| #define ASH_WM_SCREEN_DIMMER_H_
|
|
|
| #include <memory>
|
| +#include <vector>
|
|
|
| #include "ash/ash_export.h"
|
| #include "ash/common/shell_observer.h"
|
| -#include "base/compiler_specific.h"
|
| #include "base/macros.h"
|
| -#include "ui/aura/window_observer.h"
|
| -
|
| -namespace ui {
|
| -class Layer;
|
| -}
|
|
|
| namespace ash {
|
| namespace test {
|
| @@ -36,14 +31,13 @@ class WmWindowUserData;
|
| // can be adjusted).
|
| 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
|
| - // destroyed when the container is destroyed.
|
| - static ScreenDimmer* GetForContainer(int container_id);
|
| -
|
| - // Creates a dimmer a root window level. This is used for suspend animation.
|
| - static ScreenDimmer* GetForRoot();
|
| + // Indicates the container ScreenDimmer operates on.
|
| + enum class Container {
|
| + ROOT,
|
| + LOCK_SCREEN,
|
| + };
|
|
|
| + explicit ScreenDimmer(Container container);
|
| ~ScreenDimmer() override;
|
|
|
| // Dim or undim the layers.
|
| @@ -59,7 +53,8 @@ class ASH_EXPORT ScreenDimmer : public ShellObserver {
|
| private:
|
| friend class test::ScreenDimmerTest;
|
|
|
| - explicit ScreenDimmer(int container_id);
|
| + // Returns the WmWindows (one per display) that correspond to |container_|.
|
| + std::vector<WmWindow*> GetAllContainers();
|
|
|
| // ShellObserver:
|
| void OnRootWindowAdded(WmWindow* root_window) override;
|
| @@ -68,8 +63,7 @@ class ASH_EXPORT ScreenDimmer : public ShellObserver {
|
| // if necessary. (Used when a new display is connected)
|
| void Update(bool should_dim);
|
|
|
| - int container_id_;
|
| - float target_opacity_;
|
| + const Container container_;
|
|
|
| // Are we currently dimming the screen?
|
| bool is_dimming_;
|
|
|