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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Create a widget for |dialog| that is modal to |web_contents|. | 49 // Create a widget for |dialog| that is modal to |web_contents|. |
50 // The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD. | 50 // The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD. |
51 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, | 51 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, |
52 content::WebContents* web_contents); | 52 content::WebContents* web_contents); |
53 | 53 |
54 // Create a widget for |dialog| that has a modality given by | 54 // Create a widget for |dialog| that has a modality given by |
55 // |dialog->GetModalType()|. The modal type must be either | 55 // |dialog->GetModalType()|. The modal type must be either |
56 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the | 56 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the |
57 // dialog appropriately if |parent| is a valid browser window. | 57 // dialog appropriately if |parent| is a valid browser window. |
| 58 // DEPRECATED: Use CreateModalDialogViews(). |
58 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, | 59 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
59 gfx::NativeView parent); | 60 gfx::NativeView parent); |
60 | 61 |
| 62 // Create a widget for |dialog| that is modal to |host|. This could be a |
| 63 // WebContents, a browser window, or another kind of ModalDialogHost. The |
| 64 // modality is given by dialog->GetModalType(), which must be |
| 65 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. Calls through this API will |
| 66 // not use the PopupManager, but will have their position and lifetime |
| 67 // determined by |host|. |
| 68 views::Widget* CreateModalDialogViews(views::DialogDelegate* dialog, |
| 69 web_modal::ModalDialogHost* host); |
| 70 |
61 } // namespace constrained window | 71 } // namespace constrained window |
62 | 72 |
63 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ | 73 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ |
OLD | NEW |