| 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 CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 | 9 |
| 10 namespace content { | |
| 11 class BrowserContext; | |
| 12 } | |
| 13 | |
| 14 namespace views { | 10 namespace views { |
| 15 class DialogDelegate; | 11 class DialogDelegate; |
| 16 class NonClientFrameView; | |
| 17 class Widget; | 12 class Widget; |
| 18 class WidgetDelegate; | |
| 19 } | 13 } |
| 20 | 14 |
| 21 namespace web_modal { | 15 namespace web_modal { |
| 22 class ModalDialogHost; | 16 class ModalDialogHost; |
| 23 class WebContentsModalDialogHost; | 17 class WebContentsModalDialogHost; |
| 24 } | 18 } |
| 25 | 19 |
| 26 // Update the position of dialog |widget| against |dialog_host|. This is used to | 20 // Update the position of dialog |widget| against |dialog_host|. This is used to |
| 27 // reposition widgets e.g. when the host dimensions change. | 21 // reposition widgets e.g. when the host dimensions change. |
| 28 void UpdateWebContentsModalDialogPosition( | 22 void UpdateWebContentsModalDialogPosition( |
| 29 views::Widget* widget, | 23 views::Widget* widget, |
| 30 web_modal::WebContentsModalDialogHost* dialog_host); | 24 web_modal::WebContentsModalDialogHost* dialog_host); |
| 31 | 25 |
| 32 void UpdateBrowserModalDialogPosition( | 26 void UpdateBrowserModalDialogPosition( |
| 33 views::Widget* widget, | 27 views::Widget* widget, |
| 34 web_modal::ModalDialogHost* dialog_host); | 28 web_modal::ModalDialogHost* dialog_host); |
| 35 | 29 |
| 36 // Create a widget for |dialog| that is modal to the browser window |parent|. | 30 // Create a widget for |dialog| that is modal to the browser window |parent|. |
| 37 // This places the dialog appropriately if |parent| is a valid browser window. | 31 // This places the dialog appropriately if |parent| is a valid browser window. |
| 38 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, | 32 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
| 39 gfx::NativeWindow parent); | 33 gfx::NativeWindow parent); |
| 40 | 34 |
| 41 views::NonClientFrameView* CreateConstrainedStyleNonClientFrameView( | |
| 42 views::Widget* widget, | |
| 43 content::BrowserContext* browser_context); | |
| 44 | |
| 45 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 35 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| OLD | NEW |