diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-26 00:08:54 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-26 00:08:54 +0000 |
commit | 1f52637b5d454cfe53fdc1bfee79d58141f51a40 (patch) | |
tree | 30c797733e1e93b3135ba8a564dca28cdb1fd117 /chrome/browser | |
parent | b1a6110f8087d82db29471ed578425700558615a (diff) | |
download | chromium_src-1f52637b5d454cfe53fdc1bfee79d58141f51a40.zip chromium_src-1f52637b5d454cfe53fdc1bfee79d58141f51a40.tar.gz chromium_src-1f52637b5d454cfe53fdc1bfee79d58141f51a40.tar.bz2 |
Added new chromeos-specific values for bug type dropdown in user feedback dialog. Removed system info checkbox, fixed alignment of the link.
BUG=chromium-os:3564
TEST=open the feedback/bug report dialog, check the new values in the dropdown
Review URL: http://codereview.chromium.org/2220001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/bug_report_util.h | 18 | ||||
-rw-r--r-- | chrome/browser/views/bug_report_view.cc | 48 | ||||
-rw-r--r-- | chrome/browser/views/bug_report_view.h | 6 |
3 files changed, 54 insertions, 18 deletions
diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h index a37f8e8..4d8ecbd 100644 --- a/chrome/browser/bug_report_util.h +++ b/chrome/browser/bug_report_util.h @@ -29,6 +29,23 @@ class TabContents; class BugReportUtil { public: +#if defined(OS_CHROMEOS) + enum BugType { + PAGE_FORMATTING = 0, + PAGE_WONT_LOAD, + PHISHING_PAGE, + PLUGIN_ISSUE, + TABS_WINDOW_OVERVIEW_ISSUE, + CONNECTION_ISSUE, + SYNC_ISSUE, + CRASH_ISSUE, + EXTENSION_ISSUE, + APP_LAUNCHER_ISSUE, + PANEL_ISSUE, + POWER_ISSUE, + OTHER_PROBLEM + }; +#else enum BugType { PAGE_WONT_LOAD = 0, PAGE_LOOKS_ODD, @@ -39,6 +56,7 @@ class BugReportUtil { BROWSER_CRASH, OTHER_PROBLEM }; +#endif // SetOSVersion copies the maj.minor.build + servicePack_string // into a string. We currently have: diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc index faa7193..bef3c21 100644 --- a/chrome/browser/views/bug_report_view.cc +++ b/chrome/browser/views/bug_report_view.cc @@ -76,6 +76,39 @@ class BugReportComboBoxModel : public ComboboxModel { } static std::wstring GetItemAtIndex(int index) { +#if defined(OS_CHROMEOS) + switch (index) { + case BugReportUtil::PAGE_FORMATTING: + return l10n_util::GetString(IDS_BUGREPORT_PAGE_FORMATTING); + case BugReportUtil::PAGE_WONT_LOAD: + return l10n_util::GetString(IDS_BUGREPORT_PAGE_WONT_LOAD); + case BugReportUtil::PHISHING_PAGE: + return l10n_util::GetString(IDS_BUGREPORT_PHISHING_PAGE); + case BugReportUtil::PLUGIN_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_PLUGIN_ISSUE); + case BugReportUtil::TABS_WINDOW_OVERVIEW_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_TABS_WINDOW_OVERVIEW_ISSUE); + case BugReportUtil::CONNECTION_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_CONNECTION_ISSUE); + case BugReportUtil::SYNC_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_SYNC_ISSUE); + case BugReportUtil::CRASH_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_CRASH_ISSUE); + case BugReportUtil::EXTENSION_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_EXTENSION_ISSUE); + case BugReportUtil::APP_LAUNCHER_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_APP_LAUNCHER_ISSUE); + case BugReportUtil::PANEL_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_PANEL_ISSUE); + case BugReportUtil::POWER_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_POWER_ISSUE); + case BugReportUtil::OTHER_PROBLEM: + return l10n_util::GetString(IDS_BUGREPORT_OTHER_PROBLEM); + default: + NOTREACHED(); + return std::wstring(); + } +#else switch (index) { case BugReportUtil::PAGE_WONT_LOAD: return l10n_util::GetString(IDS_BUGREPORT_PAGE_WONT_LOAD); @@ -97,6 +130,7 @@ class BugReportComboBoxModel : public ComboboxModel { NOTREACHED(); return std::wstring(); } +#endif } private: @@ -216,7 +250,6 @@ void ShowBugReportView(views::Window* parent, view)->Show(); if (!have_last_image) view->DisableLastImageRadio(); - view->DisableSystemInformationCheckbox(); #endif } @@ -336,14 +369,11 @@ void BugReportView::SetupControl() { l10n_util::GetString(IDS_BUGREPORT_INCLUDE_NO_SCREEN_IMAGE), kScreenImageRadioGroup); - include_system_information_checkbox_ = new views::Checkbox( - l10n_util::GetString(IDS_BUGREPORT_INCLUDE_SYSTEM_INFORMATION_CHKBOX)); system_information_url_control_ = new views::Link( l10n_util::GetString(IDS_BUGREPORT_SYSTEM_INFORMATION_URL_TEXT)); system_information_url_control_->SetController(this); include_new_screen_image_radio_->SetChecked(true); - include_system_information_checkbox_->SetChecked(true); #endif include_page_image_checkbox_ = new views::Checkbox( l10n_util::GetString(IDS_BUGREPORT_INCLUDE_PAGE_IMAGE_CHKBOX)); @@ -419,15 +449,10 @@ void BugReportView::SetupControl() { layout->AddView(include_no_screen_image_radio_); layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing); - // Checkbox for system information - layout->StartRow(0, column_set_id); - layout->SkipColumns(1); - layout->AddView(include_system_information_checkbox_); - layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); - layout->StartRow(0, column_set_id); layout->SkipColumns(1); - layout->AddView(system_information_url_control_); + layout->AddView(system_information_url_control_, 1, 1, GridLayout::LEADING, + GridLayout::CENTER); #else if (include_page_image_checkbox_) { layout->StartRow(0, column_set_id); @@ -462,7 +487,6 @@ void BugReportView::UpdateReportingControls(bool is_phishing_report) { if (!last_image_->empty()) include_last_screen_image_radio_->SetEnabled(!is_phishing_report); include_no_screen_image_radio_->SetEnabled(!is_phishing_report); - include_system_information_checkbox_->SetChecked(!is_phishing_report); #else if (include_page_image_checkbox_) { include_page_image_checkbox_->SetEnabled(!is_phishing_report); diff --git a/chrome/browser/views/bug_report_view.h b/chrome/browser/views/bug_report_view.h index 8fd7bca..6debc55 100644 --- a/chrome/browser/views/bug_report_view.h +++ b/chrome/browser/views/bug_report_view.h @@ -90,11 +90,6 @@ class BugReportView : public views::View, include_last_screen_image_radio_->SetEnabled(false); } - // Disable the include system information checkbox - void DisableSystemInformationCheckbox() { - include_system_information_checkbox_->SetEnabled(false); - } - // NOTE: set_last_image takes ownership of the vector void set_last_image(std::vector<unsigned char>* png_data) { last_image_.reset(png_data); @@ -145,7 +140,6 @@ class BugReportView : public views::View, views::RadioButton* include_new_screen_image_radio_; views::RadioButton* include_last_screen_image_radio_; views::RadioButton* include_no_screen_image_radio_; - views::Checkbox* include_system_information_checkbox_; views::Link* system_information_url_control_; std::string system_information_url_; |