Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/browser/views/bug_report_view.cc

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // layout->StartRow(0, column_set_id); 218 // layout->StartRow(0, column_set_id);
219 // layout->SkipColumns(1); 219 // layout->SkipColumns(1);
220 // layout->AddView(include_page_source_checkbox_); 220 // layout->AddView(include_page_source_checkbox_);
221 // layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 221 // layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
222 layout->StartRow(0, column_set_id); 222 layout->StartRow(0, column_set_id);
223 layout->SkipColumns(1); 223 layout->SkipColumns(1);
224 layout->AddView(include_page_image_checkbox_); 224 layout->AddView(include_page_image_checkbox_);
225 layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing); 225 layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
226 } 226 }
227 227
228 void BugReportView::GetPreferredSize(CSize *out) { 228 gfx::Size BugReportView::GetPreferredSize() {
229 DCHECK(out); 229 return gfx::Size(ChromeViews::Window::GetLocalizedContentsSize(
230 *out = ChromeViews::Window::GetLocalizedContentsSize(
231 IDS_BUGREPORT_DIALOG_WIDTH_CHARS, 230 IDS_BUGREPORT_DIALOG_WIDTH_CHARS,
232 IDS_BUGREPORT_DIALOG_HEIGHT_LINES).ToSIZE(); 231 IDS_BUGREPORT_DIALOG_HEIGHT_LINES));
233 } 232 }
234 233
235 void BugReportView::ItemChanged(ChromeViews::ComboBox* combo_box, 234 void BugReportView::ItemChanged(ChromeViews::ComboBox* combo_box,
236 int prev_index, 235 int prev_index,
237 int new_index) { 236 int new_index) {
238 if (new_index == prev_index) 237 if (new_index == prev_index)
239 return; 238 return;
240 239
241 problem_type_ = new_index; 240 problem_type_ = new_index;
242 bool is_phishing_report = new_index == BugReportComboBoxModel::PHISHING_PAGE; 241 bool is_phishing_report = new_index == BugReportComboBoxModel::PHISHING_PAGE;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 fetcher->Start(); 481 fetcher->Start();
483 } 482 }
484 483
485 void BugReportView::ReportPhishing() { 484 void BugReportView::ReportPhishing() {
486 tab_->controller()->LoadURL( 485 tab_->controller()->LoadURL(
487 safe_browsing_util::GeneratePhishingReportUrl( 486 safe_browsing_util::GeneratePhishingReportUrl(
488 kReportPhishingUrl, WideToUTF8(page_url_text_->GetText())), 487 kReportPhishingUrl, WideToUTF8(page_url_text_->GetText())),
489 PageTransition::LINK); 488 PageTransition::LINK);
490 } 489 }
491 490
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698