Chromium Code Reviews| 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), |