summaryrefslogtreecommitdiffstats
path: root/chrome/browser/js_modal_dialog_gtk.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 20:05:13 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 20:05:13 +0000
commitba6da1fa11a1d7635e8ad5ab282734f80e2effa2 (patch)
tree25ef44da05e764cb90e995e09b75e40387ae5ce2 /chrome/browser/js_modal_dialog_gtk.cc
parentfc9e60e86ec510dcf50fa27b6d5c9bf29cb7976f (diff)
downloadchromium_src-ba6da1fa11a1d7635e8ad5ab282734f80e2effa2.zip
chromium_src-ba6da1fa11a1d7635e8ad5ab282734f80e2effa2.tar.gz
chromium_src-ba6da1fa11a1d7635e8ad5ab282734f80e2effa2.tar.bz2
GTK: Add modal cookies confirmation prompt.
BUG=35178,36183 TEST=none Review URL: http://codereview.chromium.org/652172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/js_modal_dialog_gtk.cc')
-rw-r--r--chrome/browser/js_modal_dialog_gtk.cc18
1 files changed, 2 insertions, 16 deletions
diff --git a/chrome/browser/js_modal_dialog_gtk.cc b/chrome/browser/js_modal_dialog_gtk.cc
index bf42fb6..01aff6e 100644
--- a/chrome/browser/js_modal_dialog_gtk.cc
+++ b/chrome/browser/js_modal_dialog_gtk.cc
@@ -10,8 +10,6 @@
#include "app/message_box_flags.h"
#include "base/logging.h"
#include "base/string_util.h"
-#include "chrome/browser/browser_list.h"
-#include "chrome/browser/browser_window.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/common/gtk_util.h"
@@ -82,13 +80,7 @@ void JavaScriptAppModalDialog::HandleDialogResponse(GtkDialog* dialog,
// Now that the dialog is gone, we can put all the windows into separate
// window groups so other dialogs are no longer app modal.
- for (BrowserList::const_iterator it = BrowserList::begin();
- it != BrowserList::end(); ++it) {
- GtkWindowGroup* window_group = gtk_window_group_new();
- gtk_window_group_add_window(window_group,
- (*it)->window()->GetNativeHandle());
- g_object_unref(window_group);
- }
+ gtk_util::AppModalDismissedUngroupWindows();
delete this;
}
@@ -151,13 +143,7 @@ NativeDialog JavaScriptAppModalDialog::CreateNativeDialog() {
// We want the alert to be app modal so put all the browser windows into the
// same window group.
- GtkWindowGroup* window_group = gtk_window_group_new();
- for (BrowserList::const_iterator it = BrowserList::begin();
- it != BrowserList::end(); ++it) {
- gtk_window_group_add_window(window_group,
- (*it)->window()->GetNativeHandle());
- }
- g_object_unref(window_group);
+ gtk_util::MakeAppModalWindowGroup();
gfx::NativeWindow window = client_->GetMessageBoxRootWindow();
NativeDialog dialog = gtk_message_dialog_new(window, GTK_DIALOG_MODAL,