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

Unified Diff: components/web_modal/web_contents_modal_dialog_manager.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: Change to CrOS only. Created 4 years, 4 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/web_modal/web_contents_modal_dialog_manager.cc
diff --git a/components/web_modal/web_contents_modal_dialog_manager.cc b/components/web_modal/web_contents_modal_dialog_manager.cc
index 52b404580291059c6c5d0bd1338ffbb2788ad2e6..79e54ef18db9a3cd3e2d6481c9f434d1e19707e4 100644
--- a/components/web_modal/web_contents_modal_dialog_manager.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager.cc
@@ -41,6 +41,16 @@ void WebContentsModalDialogManager::ShowModalDialog(gfx::NativeWindow dialog) {
ShowDialogWithManager(dialog, std::move(mgr));
}
+// Shows the modal dialog and records that it has a non clipped display (not
+// constrained to bounds of parent window).
+void WebContentsModalDialogManager::ShowNonClippedModalDialog(
+ gfx::NativeWindow dialog) {
+ nonclipped_child_dialogs_.push_back(dialog);
+ std::unique_ptr<SingleWebContentsDialogManager> mgr(
+ CreateNativeWebModalManager(dialog, this));
+ ShowDialogWithManager(dialog, std::move(mgr));
+}
+
// TODO(gbillock): Maybe "ShowBubbleWithManager"?
void WebContentsModalDialogManager::ShowDialogWithManager(
gfx::NativeWindow dialog,
@@ -88,6 +98,18 @@ void WebContentsModalDialogManager::WillClose(gfx::NativeWindow dialog) {
BlockWebContentsInteraction(!child_dialogs_.empty());
}
+bool WebContentsModalDialogManager::IsNonClipped(gfx::NativeWindow dialog) {
+ NativeWindowDialogList::iterator i;
+ for (i = nonclipped_child_dialogs_.begin();
+ i != nonclipped_child_dialogs_.end(); ++i) {
+ if ((*i) == dialog)
+ break;
+ }
+ if (i != nonclipped_child_dialogs_.end())
+ return true;
+ return false;
+}
+
WebContentsModalDialogManager::WebContentsModalDialogManager(
content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),

Powered by Google App Engine
This is Rietveld 408576698