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

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: Various fixes 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..15a73665919bb599d276e59c0a3476f26ce453d5 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_.insert(dialog);
+ std::unique_ptr<SingleWebContentsDialogManager> mgr(
+ CreateNativeWebModalManager(dialog, this));
+ ShowDialogWithManager(dialog, std::move(mgr));
+}
+
// TODO(gbillock): Maybe "ShowBubbleWithManager"?
void WebContentsModalDialogManager::ShowDialogWithManager(
gfx::NativeWindow dialog,
@@ -77,6 +87,7 @@ void WebContentsModalDialogManager::WillClose(gfx::NativeWindow dialog) {
if (dlg == child_dialogs_.end())
return;
+ nonclipped_child_dialogs_.erase(dialog);
bool removed_topmost_dialog = dlg == child_dialogs_.begin();
std::unique_ptr<DialogState> deleter(*dlg);
child_dialogs_.erase(dlg);
@@ -88,6 +99,14 @@ void WebContentsModalDialogManager::WillClose(gfx::NativeWindow dialog) {
BlockWebContentsInteraction(!child_dialogs_.empty());
}
+bool WebContentsModalDialogManager::IsNonClipped(
+ gfx::NativeWindow dialog) const {
+ if (nonclipped_child_dialogs_.find(dialog) !=
Mike Wittman 2016/08/15 19:36:37 return nonclipped_child_dialogs_.find(dialog) != n
rbpotter 2016/08/15 21:32:54 Done.
+ 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