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

Unified Diff: components/constrained_window/constrained_window_views.cc

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: components/constrained_window/constrained_window_views.cc
diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc
index d00551385504274b22bd5666e1d1d8496dd99168..5b957458922acb1ae3a4154099370242bc5ab938 100644
--- a/components/constrained_window/constrained_window_views.cc
+++ b/components/constrained_window/constrained_window_views.cc
@@ -130,6 +130,15 @@ void UpdateWidgetModalDialogPosition(views::Widget* widget,
widget->GetRootView()->GetPreferredSize());
}
+bool HasTopLevelDialogManager(content::WebContents* web_contents) {
+ // For embedded WebContents, use the embedder's WebContents for constrained
+ // window.
+ content::WebContents* top_level_web_contents =
+ guest_view::GuestViewBase::GetTopLevelWebContents(web_contents);
jochen (gone - plz use gerrit) 2015/07/15 13:34:01 is the return value guaranteed to be non-NULL? it'
wjmaclean 2015/07/15 13:59:58 Yes, the return value is guaranteed to be non-null
+ return web_modal::WebContentsModalDialogManager::FromWebContents(
+ top_level_web_contents) != nullptr;
+}
+
views::Widget* ShowWebModalDialogViews(
views::WidgetDelegate* dialog,
content::WebContents* initiator_web_contents) {

Powered by Google App Engine
This is Rietveld 408576698