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

Unified Diff: components/constrained_window/constrained_window_views.cc

Issue 1207313003: Allow cert-popup for WebView guests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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
« no previous file with comments | « components/constrained_window/constrained_window_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ return web_modal::WebContentsModalDialogManager::FromWebContents(
+ top_level_web_contents) != nullptr;
+}
+
views::Widget* ShowWebModalDialogViews(
views::WidgetDelegate* dialog,
content::WebContents* initiator_web_contents) {
« no previous file with comments | « components/constrained_window/constrained_window_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698