| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/views/bug_report_view.h" | 5 #include "chrome/browser/views/bug_report_view.h" |
| 6 | 6 |
| 7 #include "app/combobox_model.h" | 7 #include "app/combobox_model.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/browser/bug_report_util.h" | 11 #include "chrome/browser/bug_report_util.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 if (new_index == prev_index) | 249 if (new_index == prev_index) |
| 250 return; | 250 return; |
| 251 | 251 |
| 252 problem_type_ = new_index; | 252 problem_type_ = new_index; |
| 253 bool is_phishing_report = new_index == BugReportUtil::PHISHING_PAGE; | 253 bool is_phishing_report = new_index == BugReportUtil::PHISHING_PAGE; |
| 254 | 254 |
| 255 description_text_->SetEnabled(!is_phishing_report); | 255 description_text_->SetEnabled(!is_phishing_report); |
| 256 description_text_->SetReadOnly(is_phishing_report); | 256 description_text_->SetReadOnly(is_phishing_report); |
| 257 if (is_phishing_report) { | 257 if (is_phishing_report) { |
| 258 old_report_text_ = UTF16ToWide(description_text_->text()); | 258 old_report_text_ = UTF16ToWide(description_text_->text()); |
| 259 description_text_->SetText(EmptyString16()); | 259 description_text_->SetText(string16()); |
| 260 } else if (!old_report_text_.empty()) { | 260 } else if (!old_report_text_.empty()) { |
| 261 description_text_->SetText(WideToUTF16Hack(old_report_text_)); | 261 description_text_->SetText(WideToUTF16Hack(old_report_text_)); |
| 262 old_report_text_.clear(); | 262 old_report_text_.clear(); |
| 263 } | 263 } |
| 264 include_page_source_checkbox_->SetEnabled(!is_phishing_report); | 264 include_page_source_checkbox_->SetEnabled(!is_phishing_report); |
| 265 include_page_source_checkbox_->SetChecked(!is_phishing_report); | 265 include_page_source_checkbox_->SetChecked(!is_phishing_report); |
| 266 if (include_page_image_checkbox_) { | 266 if (include_page_image_checkbox_) { |
| 267 include_page_image_checkbox_->SetEnabled(!is_phishing_report); | 267 include_page_image_checkbox_->SetEnabled(!is_phishing_report); |
| 268 include_page_image_checkbox_->SetChecked(!is_phishing_report); | 268 include_page_image_checkbox_->SetChecked(!is_phishing_report); |
| 269 } | 269 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 reinterpret_cast<const char *>(&((*png_data_.get())[0])) : NULL, | 334 reinterpret_cast<const char *>(&((*png_data_.get())[0])) : NULL, |
| 335 png_data_->size() | 335 png_data_->size() |
| 336 ); | 336 ); |
| 337 } | 337 } |
| 338 return true; | 338 return true; |
| 339 } | 339 } |
| 340 | 340 |
| 341 views::View* BugReportView::GetContentsView() { | 341 views::View* BugReportView::GetContentsView() { |
| 342 return this; | 342 return this; |
| 343 } | 343 } |
| OLD | NEW |