diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 04:12:18 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 04:12:18 +0000 |
commit | 0f2f4b60511540e292e085ba5e1985be6bf93908 (patch) | |
tree | 6d6bb042fe78bb23c4eca3cf4a4222a3dab38e74 /chrome/browser/views/bug_report_view.cc | |
parent | aaeb9dc745d49afa66c1b613daa5a3123f309955 (diff) | |
download | chromium_src-0f2f4b60511540e292e085ba5e1985be6bf93908.zip chromium_src-0f2f4b60511540e292e085ba5e1985be6bf93908.tar.gz chromium_src-0f2f4b60511540e292e085ba5e1985be6bf93908.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/views/bug_report_view.cc')
-rw-r--r-- | chrome/browser/views/bug_report_view.cc | 9 |
1 files changed, 6 insertions, 3 deletions
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())); } |