diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 22:07:23 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 22:07:23 +0000 |
commit | bf9934764c182370321c818c050dd6f7087dbc2c (patch) | |
tree | 039f69d02c5ed074b973d8ba5f3f749f5ab6abc1 /chrome/browser | |
parent | 1ec27eb5b20f25e423b05d457c47115c296ce13d (diff) | |
download | chromium_src-bf9934764c182370321c818c050dd6f7087dbc2c.zip chromium_src-bf9934764c182370321c818c050dd6f7087dbc2c.tar.gz chromium_src-bf9934764c182370321c818c050dd6f7087dbc2c.tar.bz2 |
views: Remove using declaration from dialog_delegate.h header file.
R=sky@chromium.org
Review URL: http://codereview.chromium.org/8450001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
22 files changed, 49 insertions, 50 deletions
diff --git a/chrome/browser/chromeos/login/eula_view.cc b/chrome/browser/chromeos/login/eula_view.cc index 3424473..54ee771 100644 --- a/chrome/browser/chromeos/login/eula_view.cc +++ b/chrome/browser/chromeos/login/eula_view.cc @@ -98,7 +98,7 @@ class TpmInfoView : public views::DialogDelegateView { virtual bool IsModal() const OVERRIDE { return true; } virtual views::View* GetContentsView() OVERRIDE { return this; } virtual int GetDialogButtons() const OVERRIDE { - return MessageBoxFlags::DIALOGBUTTON_OK; + return ui::MessageBoxFlags::DIALOGBUTTON_OK; } // views::View overrides: diff --git a/chrome/browser/chromeos/login/password_changed_view.cc b/chrome/browser/chromeos/login/password_changed_view.cc index 1e7b63b..791d628 100644 --- a/chrome/browser/chromeos/login/password_changed_view.cc +++ b/chrome/browser/chromeos/login/password_changed_view.cc @@ -50,7 +50,7 @@ bool PasswordChangedView::Accept() { } int PasswordChangedView::GetDialogButtons() const { - return MessageBoxFlags::DIALOGBUTTON_OK; + return ui::MessageBoxFlags::DIALOGBUTTON_OK; } views::View* PasswordChangedView::GetInitiallyFocusedView() { diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc index 3cc24a2..6cfc0b2 100644 --- a/chrome/browser/chromeos/options/network_config_view.cc +++ b/chrome/browser/chromeos/options/network_config_view.cc @@ -69,9 +69,9 @@ string16 NetworkConfigView::GetDialogButtonLabel( } bool NetworkConfigView::IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const { + ui::MessageBoxFlags::DialogButton button) const { // Disable connect button if cannot login. - if (button == MessageBoxFlags::DIALOGBUTTON_OK) + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return child_config_view_->CanLogin(); return true; } diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h index 9743979..42c5e26a 100644 --- a/chrome/browser/chromeos/options/network_config_view.h +++ b/chrome/browser/chromeos/options/network_config_view.h @@ -52,7 +52,7 @@ class NetworkConfigView : public views::DialogDelegateView, virtual string16 GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual bool IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const OVERRIDE; + ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual bool Cancel() OVERRIDE; virtual bool Accept() OVERRIDE; virtual views::View* GetExtraView() OVERRIDE; diff --git a/chrome/browser/chromeos/options/take_photo_dialog.cc b/chrome/browser/chromeos/options/take_photo_dialog.cc index 755544b..d8800c8 100644 --- a/chrome/browser/chromeos/options/take_photo_dialog.cc +++ b/chrome/browser/chromeos/options/take_photo_dialog.cc @@ -42,10 +42,10 @@ TakePhotoDialog::~TakePhotoDialog() { } bool TakePhotoDialog::IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL) + ui::MessageBoxFlags::DialogButton button) const { + if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL) return true; - else if (button == MessageBoxFlags::DIALOGBUTTON_OK) + else if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return !take_photo_view_->is_capturing(); NOTREACHED(); return false; diff --git a/chrome/browser/chromeos/options/take_photo_dialog.h b/chrome/browser/chromeos/options/take_photo_dialog.h index d59bf48..9feca62 100644 --- a/chrome/browser/chromeos/options/take_photo_dialog.h +++ b/chrome/browser/chromeos/options/take_photo_dialog.h @@ -39,7 +39,7 @@ class TakePhotoDialog : public views::DialogDelegateView, // views::DialogDelegateView overrides. virtual bool IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const OVERRIDE; + ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual bool Cancel() OVERRIDE; virtual bool Accept() OVERRIDE; diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc index 10a1c4f..0227d4e 100644 --- a/chrome/browser/ui/views/about_chrome_view.cc +++ b/chrome/browser/ui/views/about_chrome_view.cc @@ -551,16 +551,18 @@ string16 AboutChromeView::GetWindowTitle() const { } bool AboutChromeView::IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK && !restart_button_visible_) + ui::MessageBoxFlags::DialogButton button) const { + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK && + !restart_button_visible_) return false; return true; } bool AboutChromeView::IsDialogButtonVisible( - MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK && !restart_button_visible_) + ui::MessageBoxFlags::DialogButton button) const { + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK && + !restart_button_visible_) return false; return true; @@ -571,7 +573,7 @@ bool AboutChromeView::IsDialogButtonVisible( // OK button (which is the dialog cancel button, see GetDialogButtonLabel // above). int AboutChromeView::GetDefaultDialogButton() const { - return MessageBoxFlags::DIALOGBUTTON_CANCEL; + return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL; } bool AboutChromeView::CanResize() const { diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc index 66ac121..14f21c0 100644 --- a/chrome/browser/ui/views/collected_cookies_win.cc +++ b/chrome/browser/ui/views/collected_cookies_win.cc @@ -360,7 +360,7 @@ string16 CollectedCookiesWin::GetWindowTitle() const { } int CollectedCookiesWin::GetDialogButtons() const { - return MessageBoxFlags::DIALOGBUTTON_CANCEL; + return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL; } string16 CollectedCookiesWin::GetDialogButtonLabel( diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc index 7c30b4b..b99d29d 100644 --- a/chrome/browser/ui/views/create_application_shortcut_view.cc +++ b/chrome/browser/ui/views/create_application_shortcut_view.cc @@ -331,8 +331,8 @@ string16 CreateApplicationShortcutView::GetDialogButtonLabel( } bool CreateApplicationShortcutView::IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK) + ui::MessageBoxFlags::DialogButton button) const { + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return desktop_check_box_->checked() || ((menu_check_box_ != NULL) && menu_check_box_->checked()) || @@ -359,7 +359,7 @@ string16 CreateApplicationShortcutView::GetWindowTitle() const { } bool CreateApplicationShortcutView::Accept() { - if (!IsDialogButtonEnabled(MessageBoxFlags::DIALOGBUTTON_OK)) + if (!IsDialogButtonEnabled(ui::MessageBoxFlags::DIALOGBUTTON_OK)) return false; shortcut_info_.create_on_desktop = desktop_check_box_->checked(); diff --git a/chrome/browser/ui/views/create_application_shortcut_view.h b/chrome/browser/ui/views/create_application_shortcut_view.h index c5d1e64..42fde8f 100644 --- a/chrome/browser/ui/views/create_application_shortcut_view.h +++ b/chrome/browser/ui/views/create_application_shortcut_view.h @@ -46,7 +46,7 @@ class CreateApplicationShortcutView : public views::DialogDelegateView, virtual string16 GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual bool IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const OVERRIDE; + ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual bool CanResize() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; virtual bool IsModal() const OVERRIDE; diff --git a/chrome/browser/ui/views/download/download_in_progress_dialog_view.cc b/chrome/browser/ui/views/download/download_in_progress_dialog_view.cc index 933460a..e809de1 100644 --- a/chrome/browser/ui/views/download/download_in_progress_dialog_view.cc +++ b/chrome/browser/ui/views/download/download_in_progress_dialog_view.cc @@ -111,15 +111,15 @@ gfx::Size DownloadInProgressDialogView::GetPreferredSize() { string16 DownloadInProgressDialogView::GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK) + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return ok_button_text_; - DCHECK_EQ(MessageBoxFlags::DIALOGBUTTON_CANCEL, button); + DCHECK_EQ(ui::MessageBoxFlags::DIALOGBUTTON_CANCEL, button); return cancel_button_text_; } int DownloadInProgressDialogView::GetDefaultDialogButton() const { - return MessageBoxFlags::DIALOGBUTTON_CANCEL; + return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL; } bool DownloadInProgressDialogView::Cancel() { diff --git a/chrome/browser/ui/views/download/download_in_progress_dialog_view.h b/chrome/browser/ui/views/download/download_in_progress_dialog_view.h index 0464bdd..b21593f 100644 --- a/chrome/browser/ui/views/download/download_in_progress_dialog_view.h +++ b/chrome/browser/ui/views/download/download_in_progress_dialog_view.h @@ -33,7 +33,7 @@ class DownloadInProgressDialogView : public views::DialogDelegateView { // views::View: virtual gfx::Size GetPreferredSize() OVERRIDE; - // views::DialogDelegate: + // views::DialogDelegateView: virtual string16 GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual int GetDefaultDialogButton() const OVERRIDE; diff --git a/chrome/browser/ui/views/edit_search_engine_dialog.cc b/chrome/browser/ui/views/edit_search_engine_dialog.cc index c97f7be..9bbe778 100644 --- a/chrome/browser/ui/views/edit_search_engine_dialog.cc +++ b/chrome/browser/ui/views/edit_search_engine_dialog.cc @@ -84,11 +84,11 @@ string16 EditSearchEngineDialog::GetWindowTitle() const { } bool EditSearchEngineDialog::IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK) { - return (controller_->IsKeywordValid(WideToUTF16(keyword_tf_->text())) && - controller_->IsTitleValid(WideToUTF16(title_tf_->text())) && - controller_->IsURLValid(WideToUTF8(url_tf_->text()))); + ui::MessageBoxFlags::DialogButton button) const { + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) { + return (controller_->IsKeywordValid(keyword_tf_->text()) && + controller_->IsTitleValid(title_tf_->text()) && + controller_->IsURLValid(UTF16ToUTF8(url_tf_->text()))); } return true; } @@ -99,9 +99,8 @@ bool EditSearchEngineDialog::Cancel() { } bool EditSearchEngineDialog::Accept() { - controller_->AcceptAddOrEdit(WideToUTF16(title_tf_->text()), - WideToUTF16(keyword_tf_->text()), - WideToUTF8(url_tf_->text())); + controller_->AcceptAddOrEdit(title_tf_->text(), keyword_tf_->text(), + UTF16ToUTF8(url_tf_->text())); return true; } @@ -241,13 +240,12 @@ Textfield* EditSearchEngineDialog::CreateTextfield(const std::wstring& text, } void EditSearchEngineDialog::UpdateImageViews() { - UpdateImageView(keyword_iv_, - controller_->IsKeywordValid(WideToUTF16(keyword_tf_->text())), + UpdateImageView(keyword_iv_, controller_->IsKeywordValid(keyword_tf_->text()), IDS_SEARCH_ENGINES_INVALID_KEYWORD_TT); - UpdateImageView(url_iv_, controller_->IsURLValid(WideToUTF8(url_tf_->text())), + UpdateImageView(url_iv_, + controller_->IsURLValid(UTF16ToUTF8(url_tf_->text())), IDS_SEARCH_ENGINES_INVALID_URL_TT); - UpdateImageView(title_iv_, - controller_->IsTitleValid(WideToUTF16(title_tf_->text())), + UpdateImageView(title_iv_, controller_->IsTitleValid(title_tf_->text()), IDS_SEARCH_ENGINES_INVALID_TITLE_TT); } diff --git a/chrome/browser/ui/views/edit_search_engine_dialog.h b/chrome/browser/ui/views/edit_search_engine_dialog.h index 9307936..cde395e 100644 --- a/chrome/browser/ui/views/edit_search_engine_dialog.h +++ b/chrome/browser/ui/views/edit_search_engine_dialog.h @@ -46,7 +46,7 @@ class EditSearchEngineDialog : public views::TextfieldController, virtual bool IsModal() const OVERRIDE; virtual string16 GetWindowTitle() const OVERRIDE; virtual bool IsDialogButtonEnabled( - MessageBoxFlags::DialogButton button) const OVERRIDE; + ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual bool Cancel() OVERRIDE; virtual bool Accept() OVERRIDE; virtual views::View* GetContentsView() OVERRIDE; diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc index 6b31003..38842de 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc @@ -260,7 +260,7 @@ string16 ExtensionInstallDialogView::GetDialogButtonLabel( switch (button) { case ui::MessageBoxFlags::DIALOGBUTTON_OK: return prompt_.GetAcceptButtonLabel(); - case MessageBoxFlags::DIALOGBUTTON_CANCEL: + case ui::MessageBoxFlags::DIALOGBUTTON_CANCEL: return prompt_.HasAbortButtonLabel() ? prompt_.GetAbortButtonLabel() : l10n_util::GetStringUTF16(IDS_CANCEL); @@ -271,7 +271,7 @@ string16 ExtensionInstallDialogView::GetDialogButtonLabel( } int ExtensionInstallDialogView::GetDefaultDialogButton() const { - return MessageBoxFlags::DIALOGBUTTON_CANCEL; + return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL; } bool ExtensionInstallDialogView::Cancel() { diff --git a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc index e8dd48c..0b454ab 100644 --- a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc @@ -70,7 +70,7 @@ class ExtensionUninstallDialogDelegateView : public views::DialogDelegateView { ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual int GetDefaultDialogButton() const OVERRIDE { - return MessageBoxFlags::DIALOGBUTTON_CANCEL; + return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL; } virtual bool Accept() OVERRIDE; diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc index 1adb793..abd6698 100644 --- a/chrome/browser/ui/views/hung_renderer_view.cc +++ b/chrome/browser/ui/views/hung_renderer_view.cc @@ -383,12 +383,12 @@ int HungRendererDialogView::GetDialogButtons() const { // the OK button to wait for responsiveness (and close the dialog) and our // additional button (which we create) to kill the process (which will result // in the dialog being destroyed). - return MessageBoxFlags::DIALOGBUTTON_OK; + return ui::MessageBoxFlags::DIALOGBUTTON_OK; } string16 HungRendererDialogView::GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK) + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return l10n_util::GetStringUTF16(IDS_BROWSER_HANGMONITOR_RENDERER_WAIT); return string16(); } diff --git a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc index 0af367a..1bebc9a 100644 --- a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc +++ b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc @@ -67,11 +67,10 @@ void ImportLockDialogView::Layout() { string16 ImportLockDialogView::GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK) { + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_OK); - } else if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL) { + else if (button == ui::MessageBoxFlags::DIALOGBUTTON_CANCEL) return l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_CANCEL); - } return string16(); } diff --git a/chrome/browser/ui/views/importer/import_progress_dialog_view.cc b/chrome/browser/ui/views/importer/import_progress_dialog_view.cc index 9767b99..6ced146 100644 --- a/chrome/browser/ui/views/importer/import_progress_dialog_view.cc +++ b/chrome/browser/ui/views/importer/import_progress_dialog_view.cc @@ -111,12 +111,12 @@ void ImportProgressDialogView::ViewHierarchyChanged(bool is_add, } int ImportProgressDialogView::GetDialogButtons() const { - return MessageBoxFlags::DIALOGBUTTON_CANCEL; + return ui::MessageBoxFlags::DIALOGBUTTON_CANCEL; } string16 ImportProgressDialogView::GetDialogButtonLabel( ui::MessageBoxFlags::DialogButton button) const { - DCHECK(button == MessageBoxFlags::DIALOGBUTTON_CANCEL); + DCHECK_EQ(button, ui::MessageBoxFlags::DIALOGBUTTON_CANCEL); return l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_CANCEL); } diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector.cc b/chrome/browser/ui/views/ssl_client_certificate_selector.cc index a3d1433..ca11011 100644 --- a/chrome/browser/ui/views/ssl_client_certificate_selector.cc +++ b/chrome/browser/ui/views/ssl_client_certificate_selector.cc @@ -178,7 +178,7 @@ void SSLClientCertificateSelector::DeleteDelegate() { bool SSLClientCertificateSelector::IsDialogButtonEnabled( ui::MessageBoxFlags::DialogButton button) const { - if (button == MessageBoxFlags::DIALOGBUTTON_OK) + if (button == ui::MessageBoxFlags::DIALOGBUTTON_OK) return !!GetSelectedCert(); return true; } diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc index 8904605..ea04877 100644 --- a/chrome/browser/ui/views/task_manager_view.cc +++ b/chrome/browser/ui/views/task_manager_view.cc @@ -661,7 +661,7 @@ std::string TaskManagerView::GetWindowName() const { } int TaskManagerView::GetDialogButtons() const { - return MessageBoxFlags::DIALOGBUTTON_NONE; + return ui::MessageBoxFlags::DIALOGBUTTON_NONE; } void TaskManagerView::WindowClosing() { diff --git a/chrome/browser/ui/views/user_data_dir_dialog.h b/chrome/browser/ui/views/user_data_dir_dialog.h index 75b3509..87479be 100644 --- a/chrome/browser/ui/views/user_data_dir_dialog.h +++ b/chrome/browser/ui/views/user_data_dir_dialog.h @@ -35,7 +35,7 @@ class UserDataDirDialog : public views::DialogDelegate, // views::DialogDelegate methods: virtual string16 GetDialogButtonLabel( - MessageBoxFlags::DialogButton button) const OVERRIDE; + ui::MessageBoxFlags::DialogButton button) const OVERRIDE; virtual string16 GetWindowTitle() const OVERRIDE; virtual void DeleteDelegate() OVERRIDE; virtual bool Accept() OVERRIDE; |