| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "components/constrained_window/constrained_window_views.h" | 7 #include "components/constrained_window/constrained_window_views.h" |
| 8 #include "components/web_modal/single_web_contents_dialog_manager.h" | 8 #include "components/web_modal/single_web_contents_dialog_manager.h" |
| 9 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 9 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 content::WebContents* initiator_web_contents) { | 24 content::WebContents* initiator_web_contents) { |
| 25 web_modal::WebContentsModalDialogManager* manager = | 25 web_modal::WebContentsModalDialogManager* manager = |
| 26 web_modal::WebContentsModalDialogManager::FromWebContents( | 26 web_modal::WebContentsModalDialogManager::FromWebContents( |
| 27 initiator_web_contents); | 27 initiator_web_contents); |
| 28 std::unique_ptr<web_modal::SingleWebContentsDialogManager> dialog_manager( | 28 std::unique_ptr<web_modal::SingleWebContentsDialogManager> dialog_manager( |
| 29 web_modal::WebContentsModalDialogManager::CreateNativeWebModalManager( | 29 web_modal::WebContentsModalDialogManager::CreateNativeWebModalManager( |
| 30 dialog, manager)); | 30 dialog, manager)); |
| 31 manager->ShowDialogWithManager(dialog, std::move(dialog_manager)); | 31 manager->ShowDialogWithManager(dialog, std::move(dialog_manager)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void ShowNonClippedModalDialog(gfx::NativeWindow dialog, |
| 35 content::WebContents* initiator_web_contents) { |
| 36 // Mac uses sheets, so just call the normal show modal dialog, and the dialog |
| 37 // will not be clipped. |
| 38 ShowModalDialog(dialog, initiator_web_contents); |
| 39 } |
| 40 |
| 34 } // namespace constrained_window | 41 } // namespace constrained_window |
| OLD | NEW |