| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/about_chrome_view.h" | 5 #include "chrome/browser/ui/views/about_chrome_view.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <commdlg.h> | 8 #include <commdlg.h> |
| 9 #endif // defined(OS_WIN) | 9 #endif // defined(OS_WIN) |
| 10 | 10 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 // The copyright URL portion of the main label. | 206 // The copyright URL portion of the main label. |
| 207 copyright_label_ = new views::Label( | 207 copyright_label_ = new views::Label( |
| 208 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT)); | 208 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT)); |
| 209 copyright_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 209 copyright_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 210 AddChildView(copyright_label_); | 210 AddChildView(copyright_label_); |
| 211 | 211 |
| 212 main_text_label_ = new views::Label(string16()); | 212 main_text_label_ = new views::Label(string16()); |
| 213 | 213 |
| 214 // Figure out what to write in the main label of the About box. | 214 // Figure out what to write in the main label of the About box. |
| 215 string16 text = l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_LICENSE); | 215 string16 text = l10n_util::GetStringUTF16(IDS_ABOUT_OLD_VERSION_LICENSE); |
| 216 | 216 |
| 217 chromium_url_appears_first_ = | 217 chromium_url_appears_first_ = |
| 218 text.find(kBeginLinkChr()) < text.find(kBeginLinkOss()); | 218 text.find(kBeginLinkChr()) < text.find(kBeginLinkOss()); |
| 219 | 219 |
| 220 size_t link1 = text.find(kBeginLink()); | 220 size_t link1 = text.find(kBeginLink()); |
| 221 DCHECK(link1 != string16::npos); | 221 DCHECK(link1 != string16::npos); |
| 222 size_t link1_end = text.find(kEndLink(), link1); | 222 size_t link1_end = text.find(kEndLink(), link1); |
| 223 DCHECK(link1_end != string16::npos); | 223 DCHECK(link1_end != string16::npos); |
| 224 size_t link2 = text.find(kBeginLink(), link1_end); | 224 size_t link2 = text.find(kBeginLink(), link1_end); |
| 225 DCHECK(link2 != string16::npos); | 225 DCHECK(link2 != string16::npos); |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 int height = error_label_->GetHeightForWidth( | 796 int height = error_label_->GetHeightForWidth( |
| 797 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + | 797 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + |
| 798 views::kRelatedControlVerticalSpacing; | 798 views::kRelatedControlVerticalSpacing; |
| 799 window_rect.set_height(window_rect.height() + height); | 799 window_rect.set_height(window_rect.height() + height); |
| 800 GetWidget()->SetBounds(window_rect); | 800 GetWidget()->SetBounds(window_rect); |
| 801 | 801 |
| 802 return height; | 802 return height; |
| 803 } | 803 } |
| 804 | 804 |
| 805 #endif | 805 #endif |
| OLD | NEW |