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

Unified Diff: ash/aura/wm_window_aura.h

Issue 2539363005: Converts ash to use aura-mus (Closed)
Patch Set: add overrides Created 4 years 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/aura/wm_root_window_controller_aura.cc ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_window_aura.h
diff --git a/ash/aura/wm_window_aura.h b/ash/aura/wm_window_aura.h
index 9bc3699dd5cb56355d5d9555c1b075649d935702..c307a3fd5ba06941d0f8865d13d3aca90e8aa94a 100644
--- a/ash/aura/wm_window_aura.h
+++ b/ash/aura/wm_window_aura.h
@@ -14,12 +14,12 @@
namespace ash {
-// WmWindowAura is tied to the life of the underlying aura::Window.
+// WmWindowAura is tied to the life of the underlying aura::Window. Use the
+// static Get() function to obtain a WmWindowAura from an aura::Window.
class ASH_EXPORT WmWindowAura : public WmWindow,
public aura::WindowObserver,
public ::wm::TransientWindowObserver {
public:
- explicit WmWindowAura(aura::Window* window);
// NOTE: this class is owned by the corresponding window. You shouldn't delete
// TODO(sky): friend deleter and make private.
~WmWindowAura() override;
@@ -188,7 +188,14 @@ class ASH_EXPORT WmWindowAura : public WmWindow,
void AddLimitedPreTargetHandler(ui::EventHandler* handler) override;
void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) override;
- private:
+ protected:
+ explicit WmWindowAura(aura::Window* window);
+
+ // Returns true if a WmWindowAura has been created for |window|.
+ static bool HasInstance(const aura::Window* window);
+
+ base::ObserverList<WmWindowObserver>& observers() { return observers_; }
+
// aura::WindowObserver:
void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
@@ -211,6 +218,7 @@ class ASH_EXPORT WmWindowAura : public WmWindow,
void OnTransientChildRemoved(aura::Window* window,
aura::Window* transient) override;
+ private:
aura::Window* window_;
base::ObserverList<WmWindowObserver> observers_;
« no previous file with comments | « ash/aura/wm_root_window_controller_aura.cc ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698