Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/ui/views/constrained_window_views.h

Issue 319013002: Reland Fix Views web-modal dialog widget creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert MediaGalleriesScanResultDialogViews::AcceptDialogForTesting. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 WebContents;
12 }
13
10 namespace views { 14 namespace views {
11 class DialogDelegate; 15 class DialogDelegate;
12 class Widget; 16 class Widget;
17 class WidgetDelegate;
13 } 18 }
14 19
15 namespace web_modal { 20 namespace web_modal {
16 class ModalDialogHost; 21 class ModalDialogHost;
17 class WebContentsModalDialogHost; 22 class WebContentsModalDialogHost;
18 } 23 }
19 24
20 // Update the position of dialog |widget| against |dialog_host|. This is used to 25 // Update the position of dialog |widget| against |dialog_host|. This is used to
21 // reposition widgets e.g. when the host dimensions change. 26 // reposition widgets e.g. when the host dimensions change.
22 void UpdateWebContentsModalDialogPosition( 27 void UpdateWebContentsModalDialogPosition(
23 views::Widget* widget, 28 views::Widget* widget,
24 web_modal::WebContentsModalDialogHost* dialog_host); 29 web_modal::WebContentsModalDialogHost* dialog_host);
25 30
26 void UpdateBrowserModalDialogPosition( 31 void UpdateBrowserModalDialogPosition(
27 views::Widget* widget, 32 views::Widget* widget,
28 web_modal::ModalDialogHost* dialog_host); 33 web_modal::ModalDialogHost* dialog_host);
29 34
35 // Calls CreateWebModalDialogViews, shows the dialog, and returns its widget.
36 views::Widget* ShowWebModalDialogViews(views::WidgetDelegate* dialog,
37 content::WebContents* web_contents);
38
39 // Create a widget for |dialog| that is modal to |web_contents|.
40 views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
41 content::WebContents* web_contents);
42
30 // Create a widget for |dialog| that is modal to the browser window |parent|. 43 // Create a widget for |dialog| that is modal to the browser window |parent|.
31 // This places the dialog appropriately if |parent| is a valid browser window. 44 // This places the dialog appropriately if |parent| is a valid browser window.
32 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, 45 views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
33 gfx::NativeWindow parent); 46 gfx::NativeWindow parent);
34 47
35 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ 48 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698