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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm

Issue 1234073002: Allow cert-popup for WebView guests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment. Created 5 years, 5 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: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
index f043fad5a0c019634695a187d725aec839d59d58..8ffb441862cf31512322ae0e08251f904b2e85cb 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
@@ -32,6 +32,16 @@ ConstrainedWindowMac::ConstrainedWindowMac(
manager->ShowDialogWithManager([sheet sheetWindow], native_manager.Pass());
}
+bool ConstrainedWindowMac::HasTopLevelDialogManager(
+ content::WebContents* web_contents) {
+ // |web_contents| may be embedded within a chain of nested GuestViews. If it
+ // is, follow the chain of embedders to the outermost WebContents and use it.
+ web_contents =
+ guest_view::GuestViewBase::GetTopLevelWebContents(web_contents);
+
+ return WebContentsModalDialogManager::FromWebContents(web_contents) != NULL;
+}
+
ConstrainedWindowMac::~ConstrainedWindowMac() {
CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
DCHECK(!manager_);

Powered by Google App Engine
This is Rietveld 408576698