From 0f2f4b60511540e292e085ba5e1985be6bf93908 Mon Sep 17 00:00:00 2001 From: "beng@google.com" Date: Wed, 30 Jul 2008 04:12:18 +0000 Subject: Window Delegate Improvements: - Windows now must have a Delegate. Just construct the default WindowDelegate if you don't want to have to write one in testing. - Windows now obtain their contents view by asking the delegate via WindowDelegate::GetContentsView. - Contents views no longer need to manually store a pointer to the Window that contains them, WindowDelegate does this automatically via its window() accessor. Reviewer notes: - review window_delegate.h first, then - window.h/cc - custom frame window.h/cc - constrained_window_impl.h/cc - then everything else (just updating all call sites) B=1280060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/bug_report_view.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'chrome/browser/views/bug_report_view.cc') diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc index 2977409..45023e5 100644 --- a/chrome/browser/views/bug_report_view.cc +++ b/chrome/browser/views/bug_report_view.cc @@ -154,8 +154,7 @@ void BugReportView::PostCleanup::OnURLFetchComplete( // This is separate from crash reporting, which is handled by Breakpad. // BugReportView::BugReportView(Profile* profile, TabContents* tab) - : dialog_(NULL), - include_page_source_checkbox_(NULL), + : include_page_source_checkbox_(NULL), include_page_image_checkbox_(NULL), profile_(profile), post_url_(l10n_util::GetString(IDS_BUGREPORT_POST_URL)), @@ -279,7 +278,7 @@ void BugReportView::ItemChanged(ChromeViews::ComboBox* combo_box, include_page_image_checkbox_->SetEnabled(!is_phishing_report); include_page_image_checkbox_->SetIsSelected(!is_phishing_report); - dialog_->UpdateDialogButtons(); + window()->UpdateDialogButtons(); } void BugReportView::ContentsChanged(ChromeViews::TextField* sender, @@ -340,6 +339,10 @@ bool BugReportView::Accept() { return true; } +ChromeViews::View* BugReportView::GetContentsView() { + return this; +} + void BugReportView::SetUrl(const GURL& url) { page_url_text_->SetText(UTF8ToWide(url.spec())); } -- cgit v1.1