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

Unified Diff: components/bubble/bubble_controller.cc

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: Move DCHECK string into longer comment 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
« no previous file with comments | « components/bubble/bubble_controller.h ('k') | components/bubble/bubble_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bubble/bubble_controller.cc
diff --git a/components/bubble/bubble_controller.cc b/components/bubble/bubble_controller.cc
index 8deeaa723fefa3a13599faa5f260086b905449e5..86001d20290cd44137b0ad36e97c0c6237ffb906 100644
--- a/components/bubble/bubble_controller.cc
+++ b/components/bubble/bubble_controller.cc
@@ -60,6 +60,12 @@ bool BubbleController::ShouldClose(BubbleCloseReason reason) const {
return delegate_->ShouldClose(reason) || reason == BUBBLE_CLOSE_FORCED;
}
+bool BubbleController::OwningFrameIs(
+ const content::RenderFrameHost* frame) const {
+ DCHECK(bubble_ui_);
+ return delegate_->OwningFrame() == frame;
+}
+
void BubbleController::DoClose() {
DCHECK(bubble_ui_);
bubble_ui_->Close();
« no previous file with comments | « components/bubble/bubble_controller.h ('k') | components/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698