Chromium Code Reviews| Index: services/ui/public/cpp/window_observer.h |
| diff --git a/services/ui/public/cpp/window_observer.h b/services/ui/public/cpp/window_observer.h |
| index 83ed271c2cfeecefe10268c5be4fa85ae4f26641..03fafa858ad659edd0ff7dbdd34b43791e16952e 100644 |
| --- a/services/ui/public/cpp/window_observer.h |
| +++ b/services/ui/public/cpp/window_observer.h |
| @@ -64,8 +64,24 @@ class WindowObserver { |
| virtual void OnWindowPredefinedCursorChanged(Window* window, |
| mojom::Cursor cursor) {} |
| - virtual void OnWindowVisibilityChanging(Window* window) {} |
| - virtual void OnWindowVisibilityChanged(Window* window) {} |
| + |
| + // Changing the visibility of a window results in the following sequence of |
| + // functions being called: |
| + // . OnWindowVisibilityChanging(): called on observers added to the window |
| + // whose visibility is changing. This is called before the visibility has |
| + // changed internally. |
| + // The following are called after the visibility changes: |
| + // . OnChildWindowVisibilityChanged(): called on observers added to the |
| + // parent of the window whose visibility changed. This function is generally |
| + // intended for layout managers that need to do processing before |
| + // OnWindowVisibilityChanged() is called on observers of the window. |
| + // . OnWindowVisibilityChanged(): called on observers added to the window |
| + // whose visibility changed, as well as observers added to the ancestor and |
|
James Cook
2016/10/03 20:33:08
All ancestors or immediate ancestor only?
sky
2016/10/03 20:52:13
Added 'all' for both ancestors and descendants.
|
| + // descendants of the window. |
|
James Cook
2016/10/03 20:33:08
Nice docs, btw.
|
| + virtual void OnWindowVisibilityChanging(Window* window, bool visible) {} |
| + virtual void OnChildWindowVisibilityChanged(Window* window, bool visible) {} |
| + virtual void OnWindowVisibilityChanged(Window* window, bool visible) {} |
| + |
| virtual void OnWindowOpacityChanged(Window* window, |
| float old_opacity, |
| float new_opacity) {} |