summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_modal_dialog_queue.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-16 22:41:42 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-16 22:41:42 +0000
commitb6ad1cab92ed9e9c1734d1801482cfa8ffd3b4b1 (patch)
tree0d1a8598536ed29830e4e8a4cdbcd90b5f0dbd87 /chrome/browser/app_modal_dialog_queue.cc
parent16f3bd95e3f2bd39f6d64f91326bb3cdf894cedc (diff)
downloadchromium_src-b6ad1cab92ed9e9c1734d1801482cfa8ffd3b4b1.zip
chromium_src-b6ad1cab92ed9e9c1734d1801482cfa8ffd3b4b1.tar.gz
chromium_src-b6ad1cab92ed9e9c1734d1801482cfa8ffd3b4b1.tar.bz2
Pull app modal dialog handling out of the BrowserList to remove the ChromeViews dependency. (Required for porting).
TEST=Open two browser windows. In one, enter "javascript:alert('Foo');" into the address bar and hit enter. Click on the other window. The modal dialog should be focused and the window it was opened over should flash in the taskbar, Review URL: http://codereview.chromium.org/18179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8234 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_modal_dialog_queue.cc')
-rw-r--r--chrome/browser/app_modal_dialog_queue.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/app_modal_dialog_queue.cc b/chrome/browser/app_modal_dialog_queue.cc
index 0bcceb0..6646bbc 100644
--- a/chrome/browser/app_modal_dialog_queue.cc
+++ b/chrome/browser/app_modal_dialog_queue.cc
@@ -9,6 +9,7 @@
// static
std::queue<views::AppModalDialogDelegate*>*
AppModalDialogQueue::app_modal_dialog_queue_ = NULL;
+views::AppModalDialogDelegate* AppModalDialogQueue::active_dialog_ = NULL;
// static
void AppModalDialogQueue::AddDialog(views::AppModalDialogDelegate* dialog) {
@@ -24,7 +25,7 @@ void AppModalDialogQueue::AddDialog(views::AppModalDialogDelegate* dialog) {
// static
void AppModalDialogQueue::ShowNextDialog() {
app_modal_dialog_queue_->pop();
- BrowserList::SetShowingAppModalDialog(NULL);
+ active_dialog_ = NULL;
if (!app_modal_dialog_queue_->empty()) {
ShowModalDialog(app_modal_dialog_queue_->front());
} else {
@@ -43,7 +44,5 @@ void AppModalDialogQueue::ActivateModalDialog() {
void AppModalDialogQueue::ShowModalDialog(
views::AppModalDialogDelegate* dialog) {
dialog->ShowModalDialog();
- BrowserList::SetShowingAppModalDialog(dialog);
+ active_dialog_ = dialog;
}
-
-