diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-31 22:37:56 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-31 22:37:56 +0000 |
commit | 84120cdd4d5646192923244a6255ee50d9a7cc07 (patch) | |
tree | 2a23d4d9d3dbf8b485d37f13a9d7b07632ba39a3 /ui/aura/window.h | |
parent | 9adef9db5f8e0aa9c4ebffea8a9a1bf96e72ca54 (diff) | |
download | chromium_src-84120cdd4d5646192923244a6255ee50d9a7cc07.zip chromium_src-84120cdd4d5646192923244a6255ee50d9a7cc07.tar.gz chromium_src-84120cdd4d5646192923244a6255ee50d9a7cc07.tar.bz2 |
Adds two new observer methods to allow code to be notified when a Window is added/removed from a RootWindow. This allows hierarchy-specific cleanup code to execute when a Window is removed rather than when it is destroyed, necessary for multiple root windows.
http://crbug.com/112131
TEST=see unittests
Review URL: https://chromiumcodereview.appspot.com/9315015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window.h')
-rw-r--r-- | ui/aura/window.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ui/aura/window.h b/ui/aura/window.h index 6ff7051..c1b49f1 100644 --- a/ui/aura/window.h +++ b/ui/aura/window.h @@ -293,16 +293,6 @@ class AURA_EXPORT Window : public ui::LayerDelegate { // propagation for any windows behind it in the z-order. bool StopsEventPropagation() const; - protected: - // Called when the |window| is being detached from the root window - // by being removed from its parent. It is called before |parent_| is - // set to NULL. - virtual void OnWindowDetachingFromRootWindow(aura::Window* window); - - // Called when the |window| is attached to the root window by being added - // to its parent. - virtual void OnWindowAttachedToRootWindow(aura::Window* window); - private: friend class LayoutManager; @@ -332,6 +322,11 @@ class AURA_EXPORT Window : public ui::LayerDelegate { // Called when this window's stacking order among its siblings is changed. void OnStackingChanged(); + // Notifies observers registered with this Window (and its subtree) when the + // Window has been added or is about to be removed from a RootWindow. + void NotifyAddedToRootWindow(); + void NotifyRemovingFromRootWindow(); + // Overridden from ui::LayerDelegate: virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |