diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 20:56:36 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 20:56:36 +0000 |
commit | f2887ad8d57d8ff1c826bda4311f7acd4edf637e (patch) | |
tree | d84499494880d0d78ea6f7562728360cf2b7ea53 /chrome/browser/cookie_modal_dialog_gtk.cc | |
parent | 560440269665f15714c2dd1cee17dc2a7ed501dd (diff) | |
download | chromium_src-f2887ad8d57d8ff1c826bda4311f7acd4edf637e.zip chromium_src-f2887ad8d57d8ff1c826bda4311f7acd4edf637e.tar.gz chromium_src-f2887ad8d57d8ff1c826bda4311f7acd4edf637e.tar.bz2 |
Host cookie modal dialog and js modal modal dialog in NativeDialogHost
- Enable modal dialog in NativeDialogHost. This is not fully work in ChromeOS
because e.g. user could still alt-tab away. However, setting modal would
block user from interacting with relevant browser window and avoid crashes;
- Move dialog close code from NativeHostDialog's destructor to WindowClosing
because a dialog's "response" signal handler could rely on the contents;
- Add "check-resize" signal handler to make GtkExpander work nicely with
NativeDialogHost;
- Add ShowModalDialogWithMinLocalizedWidth to gtk_util for cookie and js
modal dialog;
- Change in WidgetGtk::SetBounds to call gtk_window_move/resize always to
keep GtkWindow's geometry info up-to-date;
BUG=none
TEST=Verify cookie prompt and js dialog on ChromeOS is hosted in a Chrome window and not occupy the whole screen.
Review URL: http://codereview.chromium.org/1995001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cookie_modal_dialog_gtk.cc')
-rw-r--r-- | chrome/browser/cookie_modal_dialog_gtk.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/chrome/browser/cookie_modal_dialog_gtk.cc b/chrome/browser/cookie_modal_dialog_gtk.cc index fed41de..e2add83 100644 --- a/chrome/browser/cookie_modal_dialog_gtk.cc +++ b/chrome/browser/cookie_modal_dialog_gtk.cc @@ -32,16 +32,8 @@ void OnExpanderActivate(GtkExpander* expander) { void CookiePromptModalDialog::CreateAndShowDialog() { dialog_ = CreateNativeDialog(); - gtk_widget_show_all(GTK_WIDGET(dialog_)); - - // Suggest a minimum size. - gint width; - GtkRequisition req; - gtk_widget_size_request(dialog_, &req); - gtk_util::GetWidgetSizeFromResources(dialog_, IDS_ALERT_DIALOG_WIDTH_CHARS, 0, - &width, NULL); - if (width > req.width) - gtk_widget_set_size_request(dialog_, width, -1); + gtk_util::ShowModalDialogWithMinLocalizedWidth(GTK_WIDGET(dialog_), + IDS_ALERT_DIALOG_WIDTH_CHARS); } void CookiePromptModalDialog::AcceptWindow() { |