diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-31 23:31:11 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-31 23:31:11 +0000 |
commit | 72eb1cf61830bb0a12d62de656632aae3a94a88f (patch) | |
tree | 04cc0481ae78a75bc530c513fdd8772f3f7e3535 /ui/aura/window.h | |
parent | a7b35ed103e8fb38f6eff3ccbf3cda2282c38874 (diff) | |
download | chromium_src-72eb1cf61830bb0a12d62de656632aae3a94a88f.zip chromium_src-72eb1cf61830bb0a12d62de656632aae3a94a88f.tar.gz chromium_src-72eb1cf61830bb0a12d62de656632aae3a94a88f.tar.bz2 |
Revert 119976 - 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
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9315017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window.h')
-rw-r--r-- | ui/aura/window.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ui/aura/window.h b/ui/aura/window.h index c1b49f1..6ff7051 100644 --- a/ui/aura/window.h +++ b/ui/aura/window.h @@ -293,6 +293,16 @@ 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; @@ -322,11 +332,6 @@ 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; |