| Index: ash/common/wm/window_dimmer.h
|
| diff --git a/ash/common/wm/window_dimmer.h b/ash/common/wm/window_dimmer.h
|
| index 48ded9775d9393c43dd52d45331a2f8e77aa1598..bb6aad825b07b7a2c0692b4297245e1a565534a4 100644
|
| --- a/ash/common/wm/window_dimmer.h
|
| +++ b/ash/common/wm/window_dimmer.h
|
| @@ -5,14 +5,14 @@
|
| #ifndef ASH_COMMON_WINDOW_DIMMER_H_
|
| #define ASH_COMMON_WINDOW_DIMMER_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "ash/ash_export.h"
|
| #include "base/macros.h"
|
| #include "ui/aura/window_observer.h"
|
|
|
| namespace ash {
|
|
|
| -class WmWindow;
|
| -
|
| // WindowDimmer creates a window whose opacity is animated by way of
|
| // SetDimOpacity() and whose size matches that of its parent. WindowDimmer is
|
| // intended to be used in cases where a certain set of windows need to appear
|
| @@ -20,19 +20,18 @@ class WmWindow;
|
| // opacity, and then stacking window() above the windows that are to appear
|
| // obscured. The window created by WindowDimmer is owned by the parent, but also
|
| // deleted if WindowDimmer is deleted. It is expected that WindowDimmer is
|
| -// deleted when the parent window is deleted (such as happens with
|
| -// WmWindowUserData).
|
| +// deleted when the parent window is deleted.
|
| class ASH_EXPORT WindowDimmer : public aura::WindowObserver {
|
| public:
|
| // Creates a new WindowDimmer. The window() created by WindowDimmer is added
|
| // to |parent| and stacked above all other child windows.
|
| - explicit WindowDimmer(WmWindow* parent);
|
| + explicit WindowDimmer(aura::Window* parent);
|
| ~WindowDimmer() override;
|
|
|
| void SetDimOpacity(float target_opacity);
|
|
|
| - WmWindow* parent() { return parent_; }
|
| - WmWindow* window() { return window_; }
|
| + aura::Window* parent() { return parent_; }
|
| + aura::Window* window() { return window_.get(); }
|
|
|
| // NOTE: WindowDimmer is an observer for both |parent_| and |window_|.
|
| // aura::WindowObserver:
|
| @@ -43,8 +42,10 @@ class ASH_EXPORT WindowDimmer : public aura::WindowObserver {
|
| void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
|
|
|
| private:
|
| - WmWindow* parent_;
|
| - WmWindow* window_;
|
| + aura::Window* parent_;
|
| +
|
| + // See class description for details on ownership.
|
| + std::unique_ptr<aura::Window> window_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WindowDimmer);
|
| };
|
|
|