| Index: components/bubble/bubble_manager.h
|
| diff --git a/components/bubble/bubble_manager.h b/components/bubble/bubble_manager.h
|
| index 3e2d838f8902dc708ad4482302665377f02fe069..5182381ec6d9c93d08f19605a4a0cbd5d63933cf 100644
|
| --- a/components/bubble/bubble_manager.h
|
| +++ b/components/bubble/bubble_manager.h
|
| @@ -15,6 +15,10 @@
|
|
|
| class BubbleDelegate;
|
|
|
| +namespace content {
|
| +class RenderFrameHost;
|
| +}
|
| +
|
| // Inherit from BubbleManager to show, update, and close bubbles.
|
| // Any class that inherits from BubbleManager should capture any events that
|
| // should dismiss a bubble or update its anchor point.
|
| @@ -69,6 +73,10 @@ class BubbleManager {
|
| // Will close any open bubbles and prevent new ones from being shown.
|
| void FinalizePendingRequests();
|
|
|
| + // Closes bubbles that declare |frame| as their owner, with
|
| + // a reason of BUBBLE_CLOSE_FRAME_DESTROYED.
|
| + void CloseBubblesOwnedBy(const content::RenderFrameHost* frame);
|
| +
|
| private:
|
| enum ManagerState {
|
| SHOW_BUBBLES,
|
| @@ -76,10 +84,12 @@ class BubbleManager {
|
| ITERATING_BUBBLES,
|
| };
|
|
|
| - // All bubbles will get a close event for the specified |reason| if |match| is
|
| - // nullptr, otherwise only the bubble held by |match| will get a close event.
|
| - // Any bubble that is closed will also be deleted.
|
| - bool CloseAllMatchingBubbles(BubbleController* match,
|
| + // All matching bubbles will get a close event for the specified |reason|. Any
|
| + // bubble that is closed will also be deleted. Bubbles match if 1) |bubble| is
|
| + // null or it refers to the bubble, and 2) |owner| is null or owns the bubble.
|
| + // At most one can be non-null.
|
| + bool CloseAllMatchingBubbles(BubbleController* bubble,
|
| + const content::RenderFrameHost* owner,
|
| BubbleCloseReason reason);
|
|
|
| base::ObserverList<BubbleManagerObserver> observers_;
|
|
|