OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/about_chrome_view.h" | 5 #include "chrome/browser/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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 std::vector<size_t> url_offsets; | 305 std::vector<size_t> url_offsets; |
306 text = l10n_util::GetStringF(IDS_ABOUT_TERMS_OF_SERVICE, | 306 text = l10n_util::GetStringF(IDS_ABOUT_TERMS_OF_SERVICE, |
307 std::wstring(), | 307 std::wstring(), |
308 std::wstring(), | 308 std::wstring(), |
309 &url_offsets); | 309 &url_offsets); |
310 | 310 |
311 main_label_chunk4_ = text.substr(0, url_offsets[0]); | 311 main_label_chunk4_ = text.substr(0, url_offsets[0]); |
312 main_label_chunk5_ = text.substr(url_offsets[0]); | 312 main_label_chunk5_ = text.substr(url_offsets[0]); |
313 | 313 |
314 // The Terms of Service URL at the bottom. | 314 // The Terms of Service URL at the bottom. |
315 terms_of_service_url_ = | 315 terms_of_service_url_ = new views::Link( |
316 new views::Link(l10n_util::GetString(IDS_TERMS_OF_SERVICE)); | 316 UTF16ToWide(l10n_util::GetStringUTF16(IDS_TERMS_OF_SERVICE))); |
317 AddChildView(terms_of_service_url_); | 317 AddChildView(terms_of_service_url_); |
318 terms_of_service_url_->SetController(this); | 318 terms_of_service_url_->SetController(this); |
319 | 319 |
320 // Add the Terms of Service line and some whitespace. | 320 // Add the Terms of Service line and some whitespace. |
321 height += font.GetHeight() + kRelatedControlVerticalSpacing; | 321 height += font.GetHeight() + kRelatedControlVerticalSpacing; |
322 #endif | 322 #endif |
323 | 323 |
324 // Use whichever is greater (the calculated height or the specified minimum | 324 // Use whichever is greater (the calculated height or the specified minimum |
325 // height). | 325 // height). |
326 dialog_dimensions_.set_height(std::max(height, dialog_dimensions_.height())); | 326 dialog_dimensions_.set_height(std::max(height, dialog_dimensions_.height())); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 View* parent = GetParent(); | 825 View* parent = GetParent(); |
826 parent->Layout(); | 826 parent->Layout(); |
827 | 827 |
828 // Check button may have appeared/disappeared. We cannot call this during | 828 // Check button may have appeared/disappeared. We cannot call this during |
829 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 829 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
830 if (window()) | 830 if (window()) |
831 GetDialogClientView()->UpdateDialogButtons(); | 831 GetDialogClientView()->UpdateDialogButtons(); |
832 } | 832 } |
833 | 833 |
834 #endif | 834 #endif |
OLD | NEW |