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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 content::WebContents* initiator_web_contents); | 66 content::WebContents* initiator_web_contents); |
67 #endif | 67 #endif |
68 | 68 |
69 // Create a widget for |dialog| that is modal to |web_contents|. | 69 // Create a widget for |dialog| that is modal to |web_contents|. |
70 // The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD. | 70 // The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD. |
71 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, | 71 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, |
72 content::WebContents* web_contents); | 72 content::WebContents* web_contents); |
73 | 73 |
74 // Create a widget for |dialog| that has a modality given by | 74 // Create a widget for |dialog| that has a modality given by |
75 // |dialog->GetModalType()|. The modal type must be either | 75 // |dialog->GetModalType()|. The modal type must be either |
76 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the | 76 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the dialog |
77 // dialog appropriately if |parent| is a valid browser window. | 77 // appropriately if |parent| is a valid browser window. Currently, |parent| may |
| 78 // be null for MODAL_TYPE_WINDOW, but that's a bug and callers shouldn't rely on |
| 79 // that working. See http://crbug.com/657293. |
78 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, | 80 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
79 gfx::NativeWindow parent); | 81 gfx::NativeWindow parent); |
80 | 82 |
81 } // namespace constrained_window | 83 } // namespace constrained_window |
82 | 84 |
83 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ | 85 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ |
OLD | NEW |