| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <iostream> | 7 #include <iostream> |
| 8 #include <fstream> | 8 #include <fstream> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 bug_type_model_.reset(new BugReportComboBoxModel); | 147 bug_type_model_.reset(new BugReportComboBoxModel); |
| 148 | 148 |
| 149 // Adds all controls. | 149 // Adds all controls. |
| 150 bug_type_label_ = new views::Label( | 150 bug_type_label_ = new views::Label( |
| 151 l10n_util::GetString(IDS_BUGREPORT_BUG_TYPE)); | 151 l10n_util::GetString(IDS_BUGREPORT_BUG_TYPE)); |
| 152 bug_type_combo_ = new views::ComboBox(bug_type_model_.get()); | 152 bug_type_combo_ = new views::ComboBox(bug_type_model_.get()); |
| 153 bug_type_combo_->SetListener(this); | 153 bug_type_combo_->SetListener(this); |
| 154 | 154 |
| 155 page_title_label_ = new views::Label( | 155 page_title_label_ = new views::Label( |
| 156 l10n_util::GetString(IDS_BUGREPORT_REPORT_PAGE_TITLE)); | 156 l10n_util::GetString(IDS_BUGREPORT_REPORT_PAGE_TITLE)); |
| 157 page_title_text_ = new views::Label(tab_->GetTitle()); | 157 page_title_text_ = new views::Label(UTF16ToWideHack(tab_->GetTitle())); |
| 158 page_url_label_ = new views::Label( | 158 page_url_label_ = new views::Label( |
| 159 l10n_util::GetString(IDS_BUGREPORT_REPORT_URL_LABEL)); | 159 l10n_util::GetString(IDS_BUGREPORT_REPORT_URL_LABEL)); |
| 160 // page_url_text_'s text (if any) is filled in after dialog creation | 160 // page_url_text_'s text (if any) is filled in after dialog creation |
| 161 page_url_text_ = new views::TextField; | 161 page_url_text_ = new views::TextField; |
| 162 page_url_text_->SetController(this); | 162 page_url_text_->SetController(this); |
| 163 | 163 |
| 164 description_label_ = new views::Label( | 164 description_label_ = new views::Label( |
| 165 l10n_util::GetString(IDS_BUGREPORT_DESCRIPTION_LABEL)); | 165 l10n_util::GetString(IDS_BUGREPORT_DESCRIPTION_LABEL)); |
| 166 description_text_ = | 166 description_text_ = |
| 167 new views::TextField(views::TextField::STYLE_MULTILINE); | 167 new views::TextField(views::TextField::STYLE_MULTILINE); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 481 } |
| 482 | 482 |
| 483 void BugReportView::ReportPhishing() { | 483 void BugReportView::ReportPhishing() { |
| 484 tab_->controller()->LoadURL( | 484 tab_->controller()->LoadURL( |
| 485 safe_browsing_util::GeneratePhishingReportUrl( | 485 safe_browsing_util::GeneratePhishingReportUrl( |
| 486 kReportPhishingUrl, WideToUTF8(page_url_text_->GetText())), | 486 kReportPhishingUrl, WideToUTF8(page_url_text_->GetText())), |
| 487 GURL(), | 487 GURL(), |
| 488 PageTransition::LINK); | 488 PageTransition::LINK); |
| 489 } | 489 } |
| 490 | 490 |
| OLD | NEW |