| Index: ash/wm/aura/wm_globals_aura.cc
|
| diff --git a/ash/wm/aura/wm_globals_aura.cc b/ash/wm/aura/wm_globals_aura.cc
|
| index fe21613452368817d269796bb2ad27784955e3c8..c9c9d38eab303ca549b02f5006e02ff1991340c8 100644
|
| --- a/ash/wm/aura/wm_globals_aura.cc
|
| +++ b/ash/wm/aura/wm_globals_aura.cc
|
| @@ -22,25 +22,14 @@
|
|
|
| namespace ash {
|
| namespace wm {
|
| -namespace {
|
| -
|
| -WmGlobalsAura* instance_ = nullptr;
|
| -
|
| -} // namespace
|
| -
|
| -// static
|
| -WmGlobals* WmGlobals::Get() {
|
| - return instance_;
|
| -}
|
|
|
| WmGlobalsAura::WmGlobalsAura() {
|
| - DCHECK(!instance_);
|
| - instance_ = this;
|
| + WmGlobals::Set(this);
|
| Shell::GetInstance()->AddShellObserver(this);
|
| }
|
|
|
| WmGlobalsAura::~WmGlobalsAura() {
|
| - instance_ = nullptr;
|
| + WmGlobals::Set(nullptr);
|
| if (added_activation_observer_) {
|
| aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
|
| ->RemoveObserver(this);
|
| @@ -51,13 +40,6 @@ WmGlobalsAura::~WmGlobalsAura() {
|
| Shell::GetInstance()->RemoveShellObserver(this);
|
| }
|
|
|
| -// static
|
| -WmGlobalsAura* WmGlobalsAura::Get() {
|
| - if (!instance_)
|
| - new WmGlobalsAura;
|
| - return instance_;
|
| -}
|
| -
|
| WmWindow* WmGlobalsAura::GetFocusedWindow() {
|
| return WmWindowAura::Get(
|
| aura::client::GetFocusClient(Shell::GetPrimaryRootWindow())
|
|
|