Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3524)

Unified Diff: ash/wm/aura/wm_globals_aura.h

Issue 1907863002: Converts DockedWindowLayoutManager to common ash/wm types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/aura/aura_layout_manager_adapter.h ('k') | ash/wm/aura/wm_globals_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ash/wm/aura/aura_layout_manager_adapter.h ('k') | ash/wm/aura/wm_globals_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698