Chromium Code Reviews| Index: components/bubble/bubble_manager.h |
| diff --git a/components/bubble/bubble_manager.h b/components/bubble/bubble_manager.h |
| index 3e2d838f8902dc708ad4482302665377f02fe069..e1a1dfb5f2c9dbf7e53534619800a94a14248c8c 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,11 @@ 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. |
| + // 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) match is |
| + // null or it refers to the bubble, and 2) frame is null or owns the bubble. |
| bool CloseAllMatchingBubbles(BubbleController* match, |
|
hcarmona
2016/02/05 22:48:24
Can we rename these params to |bubble_match| and |
Peter Kasting
2016/02/06 04:13:08
I think |bubble| and |owner| would be better names
Jeffrey Yasskin
2016/02/08 23:59:09
I also like |bubble| and |owner|.
hcarmona
2016/02/09 00:31:05
|bubble| and |owner| are fine.
|
| + const content::RenderFrameHost* frame, |
| BubbleCloseReason reason); |
| base::ObserverList<BubbleManagerObserver> observers_; |