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

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: Updated to use WebContentsModalDialogManager. 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..9ff4cafd4a3ce9a91c463f41190881d914d4face 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);
davidben 2015/07/07 16:41:23 MSVC doesn't like implicit pointer-to-bool here. Y
wjmaclean 2015/07/07 17:17:43 Done.
+}
+
views::Widget* ShowWebModalDialogViews(
views::WidgetDelegate* dialog,
content::WebContents* initiator_web_contents) {

Powered by Google App Engine
This is Rietveld 408576698