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 <memory> |
| 9 |
9 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 class WebContents; | 13 class WebContents; |
13 } | 14 } |
14 | 15 |
15 namespace views { | 16 namespace views { |
16 class DialogDelegate; | 17 class DialogDelegate; |
17 class Widget; | 18 class Widget; |
18 class WidgetDelegate; | 19 class WidgetDelegate; |
19 } | 20 } |
20 | 21 |
21 namespace web_modal { | 22 namespace web_modal { |
22 class ModalDialogHost; | 23 class ModalDialogHost; |
23 class WebContentsModalDialogHost; | 24 class WebContentsModalDialogHost; |
24 } | 25 } |
25 | 26 |
26 namespace constrained_window { | 27 namespace constrained_window { |
27 | 28 |
28 class ConstrainedWindowViewsClient; | 29 class ConstrainedWindowViewsClient; |
29 | 30 |
30 // Sets the ConstrainedWindowClient impl. | 31 // Sets the ConstrainedWindowClient impl. |
31 void SetConstrainedWindowViewsClient( | 32 void SetConstrainedWindowViewsClient( |
32 scoped_ptr<ConstrainedWindowViewsClient> client); | 33 std::unique_ptr<ConstrainedWindowViewsClient> client); |
33 | 34 |
34 // Update the position of dialog |widget| against |dialog_host|. This is used to | 35 // Update the position of dialog |widget| against |dialog_host|. This is used to |
35 // reposition widgets e.g. when the host dimensions change. | 36 // reposition widgets e.g. when the host dimensions change. |
36 void UpdateWebContentsModalDialogPosition( | 37 void UpdateWebContentsModalDialogPosition( |
37 views::Widget* widget, | 38 views::Widget* widget, |
38 web_modal::WebContentsModalDialogHost* dialog_host); | 39 web_modal::WebContentsModalDialogHost* dialog_host); |
39 | 40 |
40 void UpdateWidgetModalDialogPosition( | 41 void UpdateWidgetModalDialogPosition( |
41 views::Widget* widget, | 42 views::Widget* widget, |
42 web_modal::ModalDialogHost* dialog_host); | 43 web_modal::ModalDialogHost* dialog_host); |
(...skipping 11 matching lines...) Expand all Loading... |
54 // Create a widget for |dialog| that has a modality given by | 55 // Create a widget for |dialog| that has a modality given by |
55 // |dialog->GetModalType()|. The modal type must be either | 56 // |dialog->GetModalType()|. The modal type must be either |
56 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the | 57 // ui::MODAL_TYPE_SYSTEM or ui::MODAL_TYPE_WINDOW. This places the |
57 // dialog appropriately if |parent| is a valid browser window. | 58 // dialog appropriately if |parent| is a valid browser window. |
58 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, | 59 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
59 gfx::NativeWindow parent); | 60 gfx::NativeWindow parent); |
60 | 61 |
61 } // namespace constrained window | 62 } // namespace constrained window |
62 | 63 |
63 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ | 64 #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_ |
OLD | NEW |