| Index: ash/wm/aura/wm_globals_aura.h
|
| diff --git a/ash/wm/aura/wm_globals_aura.h b/ash/wm/aura/wm_globals_aura.h
|
| index 37872ef05312d10e180431f7ca35db52fac90d74..16af349ec4f82b4eae9107ec7d3d0821b85f4447 100644
|
| --- a/ash/wm/aura/wm_globals_aura.h
|
| +++ b/ash/wm/aura/wm_globals_aura.h
|
| @@ -10,11 +10,14 @@
|
| #include "ash/ash_export.h"
|
| #include "ash/wm/common/wm_globals.h"
|
| #include "base/macros.h"
|
| +#include "base/observer_list.h"
|
| +#include "ui/wm/public/activation_change_observer.h"
|
|
|
| namespace ash {
|
| namespace wm {
|
|
|
| -class ASH_EXPORT WmGlobalsAura : public WmGlobals {
|
| +class ASH_EXPORT WmGlobalsAura : public WmGlobals,
|
| + public aura::client::ActivationChangeObserver {
|
| public:
|
| WmGlobalsAura();
|
| ~WmGlobalsAura() override;
|
| @@ -22,6 +25,7 @@ class ASH_EXPORT WmGlobalsAura : public WmGlobals {
|
| static WmGlobalsAura* Get();
|
|
|
| // WmGlobals:
|
| + WmWindow* GetFocusedWindow() override;
|
| WmWindow* GetActiveWindow() override;
|
| WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
|
| WmWindow* GetRootWindowForNewWindows() override;
|
| @@ -30,8 +34,18 @@ class ASH_EXPORT WmGlobalsAura : public WmGlobals {
|
| void LockCursor() override;
|
| void UnlockCursor() override;
|
| std::vector<WmWindow*> GetAllRootWindows() override;
|
| + void AddActivationObserver(WmActivationObserver* observer) override;
|
| + void RemoveActivationObserver(WmActivationObserver* observer) override;
|
|
|
| private:
|
| + // aura::client::ActivationChangeObserver:
|
| + void OnWindowActivated(ActivationReason reason,
|
| + aura::Window* gained_active,
|
| + aura::Window* lost_active) override;
|
| +
|
| + bool added_activation_observer_ = false;
|
| + base::ObserverList<WmActivationObserver> activation_observers_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WmGlobalsAura);
|
| };
|
|
|
|
|