| Index: ui/wm/core/transient_window_manager.h
|
| diff --git a/ui/wm/core/transient_window_manager.h b/ui/wm/core/transient_window_manager.h
|
| index 7d37679f924d0cbf8b6b684b92eaa2430b3f518a..7a7ee466373e90a1960b4a672a4b95f7bfc99f63 100644
|
| --- a/ui/wm/core/transient_window_manager.h
|
| +++ b/ui/wm/core/transient_window_manager.h
|
| @@ -23,6 +23,8 @@ class TransientWindowObserver;
|
| // or transient parent is destroyed.
|
| // . If a transient child and its transient parent share the same parent, then
|
| // transient children are always ordered above the transient parent.
|
| +// . If a transient parent is hidden, it hides all transient children.
|
| +// For show operation, please refer to |set_parent_controls_visibility(bool)|.
|
| // Transient windows are typically used for popups and menus.
|
| // TODO(sky): when we nuke TransientWindowClient rename this to
|
| // TransientWindowController.
|
| @@ -46,6 +48,14 @@ class WM_EXPORT TransientWindowManager : public aura::WindowObserver {
|
| void AddTransientChild(aura::Window* child);
|
| void RemoveTransientChild(aura::Window* child);
|
|
|
| + // Setting true lets the transient parent show this transient
|
| + // child when the parent is shown. If this was shown when the
|
| + // transient parent is hidden, it remains hidden and gets shown
|
| + // when the transient parent is shown. This is false by default.
|
| + void set_parent_controls_visibility(bool parent_controls_visibility) {
|
| + parent_controls_visibility_ = parent_controls_visibility;
|
| + }
|
| +
|
| const Windows& transient_children() const { return transient_children_; }
|
|
|
| aura::Window* transient_parent() { return transient_parent_; }
|
| @@ -65,11 +75,17 @@ class WM_EXPORT TransientWindowManager : public aura::WindowObserver {
|
| // above it.
|
| void RestackTransientDescendants();
|
|
|
| + // Update the window's visibility following the transient parent's
|
| + // visibility. See |set_parent_controls_visibility(bool)| for more details.
|
| + void UpdateTransientChildVisibility(bool visible);
|
| +
|
| // WindowObserver:
|
| virtual void OnWindowParentChanged(aura::Window* window,
|
| aura::Window* parent) OVERRIDE;
|
| virtual void OnWindowVisibilityChanging(aura::Window* window,
|
| bool visible) OVERRIDE;
|
| + virtual void OnWindowVisibilityChanged(aura::Window* window,
|
| + bool visible) OVERRIDE;
|
| virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE;
|
| virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
|
|
|
| @@ -81,6 +97,10 @@ class WM_EXPORT TransientWindowManager : public aura::WindowObserver {
|
| // transient ancestor changing.
|
| aura::Window* stacking_target_;
|
|
|
| + bool parent_controls_visibility_;
|
| + bool show_on_parent_visible_;
|
| + bool ignore_visibility_changed_event_;
|
| +
|
| ObserverList<TransientWindowObserver> observers_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TransientWindowManager);
|
|
|