diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 00:37:20 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 00:37:20 +0000 |
commit | fad84eab5e64996804824f2c7b8fce98da13b2cd (patch) | |
tree | 2fce4e91880f94c3e94687e9c0521586c37fa916 /chrome/browser/browser_list.cc | |
parent | 792e3c941a74c48db7454a945260a0e8b288ffce (diff) | |
download | chromium_src-fad84eab5e64996804824f2c7b8fce98da13b2cd.zip chromium_src-fad84eab5e64996804824f2c7b8fce98da13b2cd.tar.gz chromium_src-fad84eab5e64996804824f2c7b8fce98da13b2cd.tar.bz2 |
Adding the capacity to interact with modal dialogs to the automation framework.
This change will be used by Ojan to implement some unload handler tests.
TEST=Run the ui tests.
Review URL: http://codereview.chromium.org/13113
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_list.cc')
-rw-r--r-- | chrome/browser/browser_list.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/browser_list.cc b/chrome/browser/browser_list.cc index 67d6a56..2665daa 100644 --- a/chrome/browser/browser_list.cc +++ b/chrome/browser/browser_list.cc @@ -176,18 +176,23 @@ bool BrowserList::HasBrowserWithProfile(Profile* profile) { } // static -bool BrowserList::is_app_modal_ = false; +views::AppModalDialogDelegate* BrowserList::app_modal_dialog_ = NULL; // static -void BrowserList::SetIsShowingAppModalDialog(bool is_app_modal) { - // If we are already modal, we can't go modal again. - DCHECK(!(is_app_modal_ && is_app_modal)); - is_app_modal_ = is_app_modal; +void BrowserList::SetShowingAppModalDialog( + views::AppModalDialogDelegate* dialog) { + DCHECK(!(app_modal_dialog_ && dialog)); + app_modal_dialog_ = dialog; +} + +// static +views::AppModalDialogDelegate* BrowserList::GetShowingAppModalDialog() { + return app_modal_dialog_; } // static bool BrowserList::IsShowingAppModalDialog() { - return is_app_modal_; + return app_modal_dialog_ != NULL; } // static |