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

Unified Diff: components/constrained_window/constrained_window_views.cc

Issue 2357243003: [UI] Make auto-resizable constrained web dialog work even when initiated (Closed)
Patch Set: Addressed comments Created 4 years, 3 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 15fad72bf5bac3f6b9882971a16bc56e439901e4..ccdfdd1606700fa05b4f4d4cfdd5ab52e98489c2 100644
--- a/components/constrained_window/constrained_window_views.cc
+++ b/components/constrained_window/constrained_window_views.cc
@@ -145,6 +145,12 @@ void UpdateWidgetModalDialogPosition(views::Widget* widget,
widget->GetRootView()->GetPreferredSize());
}
+content::WebContents* GetTopLevelWebContents(
+ content::WebContents* initiator_web_contents) {
+ return guest_view::GuestViewBase::GetTopLevelWebContents(
+ initiator_web_contents);
+}
+
views::Widget* ShowWebModalDialogViews(
views::WidgetDelegate* dialog,
content::WebContents* initiator_web_contents) {
@@ -152,7 +158,7 @@ views::Widget* ShowWebModalDialogViews(
// For embedded WebContents, use the embedder's WebContents for constrained
// window.
content::WebContents* web_contents =
- guest_view::GuestViewBase::GetTopLevelWebContents(initiator_web_contents);
+ GetTopLevelWebContents(initiator_web_contents);
views::Widget* widget = CreateWebModalDialogViews(dialog, web_contents);
ShowModalDialog(widget->GetNativeWindow(), web_contents);
return widget;
@@ -166,7 +172,7 @@ views::Widget* ShowWebModalDialogWithOverlayViews(
// For embedded WebContents, use the embedder's WebContents for constrained
// window.
content::WebContents* web_contents =
- guest_view::GuestViewBase::GetTopLevelWebContents(initiator_web_contents);
+ GetTopLevelWebContents(initiator_web_contents);
views::Widget* widget = CreateWebModalDialogViews(dialog, web_contents);
web_modal::WebContentsModalDialogManager* manager =
web_modal::WebContentsModalDialogManager::FromWebContents(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