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

Unified Diff: components/constrained_window/show_modal_dialog_views.cc

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge ConstrainedWebDialog functions Created 4 years 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/show_modal_dialog_views.cc
diff --git a/components/constrained_window/show_modal_dialog_views.cc b/components/constrained_window/show_modal_dialog_views.cc
index 78af596c0011de20bcad44436a46a2edf2a027ad..0ff95f1a96658286376bb5d054a66f673d8c3395 100644
--- a/components/constrained_window/show_modal_dialog_views.cc
+++ b/components/constrained_window/show_modal_dialog_views.cc
@@ -9,6 +9,7 @@
#include "components/web_modal/single_web_contents_dialog_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
+#include "ui/base/accelerators/accelerator.h"
#include "ui/gfx/native_widget_types.h"
namespace constrained_window {
@@ -20,8 +21,19 @@ void ShowModalDialog(gfx::NativeWindow dialog,
DCHECK(manager);
std::unique_ptr<web_modal::SingleWebContentsDialogManager> dialog_manager(
new constrained_window::NativeWebContentsModalDialogManagerViews(
- dialog, manager));
+ dialog, manager, false, NULL));
manager->ShowDialogWithManager(dialog, std::move(dialog_manager));
}
+void ShowTopLevelModalDialog(gfx::NativeWindow dialog,
+ content::WebContents* web_contents,
+ ui::AcceleratorTarget* target) {
+ web_modal::WebContentsModalDialogManager* manager =
+ web_modal::WebContentsModalDialogManager::FromWebContents(web_contents);
+ DCHECK(manager);
+ std::unique_ptr<web_modal::SingleWebContentsDialogManager> dialog_manager(
+ new constrained_window::NativeWebContentsModalDialogManagerViews(
+ dialog, manager, true, target));
+ manager->ShowDialogWithManager(dialog, std::move(dialog_manager));
+}
} // namespace constrained_window
« no previous file with comments | « components/constrained_window/show_modal_dialog_cocoa.cc ('k') | components/web_modal/single_web_contents_dialog_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698