Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ | 5 #ifndef COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ |
| 6 #define COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ | 6 #define COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 | 40 |
| 41 void UpdateWidgetModalDialogPosition( | 41 void UpdateWidgetModalDialogPosition( |
| 42 views::Widget* widget, | 42 views::Widget* widget, |
| 43 web_modal::ModalDialogHost* dialog_host); | 43 web_modal::ModalDialogHost* dialog_host); |
| 44 | 44 |
| 45 // Calls CreateWebModalDialogViews, shows the dialog, and returns its widget. | 45 // Calls CreateWebModalDialogViews, shows the dialog, and returns its widget. |
| 46 views::Widget* ShowWebModalDialogViews( | 46 views::Widget* ShowWebModalDialogViews( |
| 47 views::WidgetDelegate* dialog, | 47 views::WidgetDelegate* dialog, |
| 48 content::WebContents* initiator_web_contents); | 48 content::WebContents* initiator_web_contents); |
| 49 | 49 |
| 50 // Calls CreateWebModalDialogViews, shows the dialog as a non-clipped dialog | |
| 51 // (bounds not constrained by the parent window) and returns its widget. For | |
| 52 // platforms that do not support unclipped dialogs, has the same behavior as | |
|
Mike Wittman
2016/08/12 22:51:34
Mention which platforms support non-clipped dialog
rbpotter
2016/08/15 18:03:45
Done.
| |
| 53 // ShowWebModalDialogViews. | |
| 54 views::Widget* ShowNonClippedWebModalDialogViews( | |
| 55 views::WidgetDelegate* dialog, | |
| 56 content::WebContents* initiator_web_contents); | |
| 57 | |
| 50 // Create a widget for |dialog| that is modal to |web_contents|. | 58 // Create a widget for |dialog| that is modal to |web_contents|. |
| 51 // The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD. | 59 // The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD. |
| 52 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, | 60 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, |
| 53 content::WebContents* web_contents); | 61 content::WebContents* web_contents); |
| 54 | 62 |
| 55 // Create a widget for |dialog| that has a modality given by | 63 // Create a widget for |dialog| that has a modality given by |
| 56 // |dialog->GetModalType()|. The modal type must be either | 64 // |dialog->GetModalType()|. The modal type must be either |
| 57 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the | 65 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the |
| 58 // dialog appropriately if |parent| is a valid browser window. | 66 // dialog appropriately if |parent| is a valid browser window. |
| 59 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, | 67 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
| 60 gfx::NativeWindow parent); | 68 gfx::NativeWindow parent); |
| 61 | 69 |
| 62 } // namespace constrained window | 70 } // namespace constrained_window |
| 63 | 71 |
| 64 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ | 72 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ |
| OLD | NEW |