| Index: ash/wm/window_state_aura.cc
|
| diff --git a/ash/wm/window_state_aura.cc b/ash/wm/window_state_aura.cc
|
| index 9bd2b3a993cd4a9538541dd85d9cdf696480c091..2dfeb49a08017e4e31f47f79081c4bfb451a5cdc 100644
|
| --- a/ash/wm/window_state_aura.cc
|
| +++ b/ash/wm/window_state_aura.cc
|
| @@ -12,6 +12,21 @@
|
|
|
| namespace ash {
|
| namespace wm {
|
| +namespace {
|
| +
|
| +// This classes is used so that the WindowState constructor can be made
|
| +// protected. GetWindowState() is the only place that should be creating
|
| +// WindowState.
|
| +class WindowStateAura : public wm::WindowState {
|
| + public:
|
| + explicit WindowStateAura(WmWindow* window) : wm::WindowState(window) {}
|
| + ~WindowStateAura() override {}
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WindowStateAura);
|
| +};
|
| +
|
| +} // namespace
|
|
|
| WindowState* GetActiveWindowState() {
|
| aura::Window* active = GetActiveWindow();
|
| @@ -23,7 +38,7 @@ WindowState* GetWindowState(aura::Window* window) {
|
| return nullptr;
|
| WindowState* settings = window->GetProperty(kWindowStateKey);
|
| if (!settings) {
|
| - settings = new WindowState(WmWindowAura::Get(window));
|
| + settings = new WindowStateAura(WmWindowAura::Get(window));
|
| window->SetProperty(kWindowStateKey, settings);
|
| }
|
| return settings;
|
|
|