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