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

Unified Diff: components/bubble/bubble_delegate.h

Issue 1572743002: Make sure bubbles in Views default to close before their RenderFrameHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Add a test and only allow one filter in CloseAllMatchingBubbles. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/bubble/bubble_delegate.h
diff --git a/components/bubble/bubble_delegate.h b/components/bubble/bubble_delegate.h
index d1f07e952902878665510f224328a53c2e5084fa..d3914c30566fca986bd2385b129f12703e6ebc8f 100644
--- a/components/bubble/bubble_delegate.h
+++ b/components/bubble/bubble_delegate.h
@@ -13,6 +13,10 @@
class BubbleUi;
+namespace content {
+class RenderFrameHost;
+}
+
// Inherit from this class to define a bubble. A bubble is a small transient UI
// surface anchored to a parent window. Most bubbles are dismissed when they
// lose focus.
@@ -41,6 +45,10 @@ class BubbleDelegate {
// Used to identify a bubble for collecting metrics.
virtual std::string GetName() const = 0;
+ // If this returns non-null, the bubble will be closed when the returned frame
+ // is destroyed.
+ virtual const content::RenderFrameHost* OwningFrame() const = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(BubbleDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698