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

Side by Side Diff: ui/aura/window_observer.h

Issue 257023002: Adds back some debugging code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another ref Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_WINDOW_OBSERVER_H_ 5 #ifndef UI_AURA_WINDOW_OBSERVER_H_
6 #define UI_AURA_WINDOW_OBSERVER_H_ 6 #define UI_AURA_WINDOW_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/aura/aura_export.h" 9 #include "ui/aura/aura_export.h"
10 10
(...skipping 13 matching lines...) Expand all
24 HIERARCHY_CHANGED 24 HIERARCHY_CHANGED
25 }; 25 };
26 26
27 Window* target; // The window that was added or removed. 27 Window* target; // The window that was added or removed.
28 Window* new_parent; 28 Window* new_parent;
29 Window* old_parent; 29 Window* old_parent;
30 HierarchyChangePhase phase; 30 HierarchyChangePhase phase;
31 Window* receiver; // The window receiving the notification. 31 Window* receiver; // The window receiving the notification.
32 }; 32 };
33 33
34 WindowObserver();
35
34 // Called when a window is added or removed. Notifications are sent to the 36 // Called when a window is added or removed. Notifications are sent to the
35 // following hierarchies in this order: 37 // following hierarchies in this order:
36 // 1. |target|. 38 // 1. |target|.
37 // 2. |target|'s child hierarchy. 39 // 2. |target|'s child hierarchy.
38 // 3. |target|'s parent hierarchy in its |old_parent| 40 // 3. |target|'s parent hierarchy in its |old_parent|
39 // (only for Changing notifications). 41 // (only for Changing notifications).
40 // 3. |target|'s parent hierarchy in its |new_parent|. 42 // 3. |target|'s parent hierarchy in its |new_parent|.
41 // (only for Changed notifications). 43 // (only for Changed notifications).
42 // This sequence is performed via the Changing and Changed notifications below 44 // This sequence is performed via the Changing and Changed notifications below
43 // before and after the change is committed. 45 // before and after the change is committed.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Called when a Window has been added to a RootWindow. 106 // Called when a Window has been added to a RootWindow.
105 virtual void OnWindowAddedToRootWindow(Window* window) {} 107 virtual void OnWindowAddedToRootWindow(Window* window) {}
106 108
107 // Called when a Window is about to be removed from a root Window. 109 // Called when a Window is about to be removed from a root Window.
108 // |new_root| contains the new root Window if it is being added to one 110 // |new_root| contains the new root Window if it is being added to one
109 // atomically. 111 // atomically.
110 virtual void OnWindowRemovingFromRootWindow(Window* window, 112 virtual void OnWindowRemovingFromRootWindow(Window* window,
111 Window* new_root) {} 113 Window* new_root) {}
112 114
113 protected: 115 protected:
114 virtual ~WindowObserver() {} 116 virtual ~WindowObserver();
117
118 private:
119 friend class Window;
120
121 // Called when this is added as an observer on |window|.
122 void OnObservingWindow(Window* window);
123
124 // Called when this is removed from the observers on |window|.
125 void OnUnobservingWindow(Window* window);
126
127 // Tracks the number of windows being observed to track down
128 // http://crbug.com/365364.
129 int observing_;
115 }; 130 };
flackr 2014/04/28 17:08:27 This now need DISALLOW_COPY_AND_ASSIGN I think.
sky 2014/04/28 17:18:36 Done.
116 131
117 } // namespace aura 132 } // namespace aura
118 133
119 #endif // UI_AURA_WINDOW_OBSERVER_H_ 134 #endif // UI_AURA_WINDOW_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_observer.cc » ('j') | ui/aura/window_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698