| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/app/chrome_version_info.h" |
| 13 #include "chrome/browser/browser_list.h" | 14 #include "chrome/browser/browser_list.h" |
| 14 #include "chrome/browser/metrics/user_metrics.h" | 15 #include "chrome/browser/metrics/user_metrics.h" |
| 15 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
| 16 #include "chrome/common/platform_util.h" | 17 #include "chrome/common/platform_util.h" |
| 17 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 18 #include "gfx/canvas.h" | 19 #include "gfx/canvas.h" |
| 19 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
| 20 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 21 #include "grit/locale_settings.h" | 22 #include "grit/locale_settings.h" |
| 22 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (google_updater_) | 124 if (google_updater_) |
| 124 google_updater_->set_status_listener(NULL); | 125 google_updater_->set_status_listener(NULL); |
| 125 #endif | 126 #endif |
| 126 } | 127 } |
| 127 | 128 |
| 128 void AboutChromeView::Init() { | 129 void AboutChromeView::Init() { |
| 129 text_direction_is_rtl_ = base::i18n::IsRTL(); | 130 text_direction_is_rtl_ = base::i18n::IsRTL(); |
| 130 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 131 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 131 | 132 |
| 132 scoped_ptr<FileVersionInfo> version_info( | 133 scoped_ptr<FileVersionInfo> version_info( |
| 133 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 134 chrome_app::GetChromeVersionInfo()); |
| 134 if (version_info.get() == NULL) { | 135 if (version_info.get() == NULL) { |
| 135 NOTREACHED() << L"Failed to initialize about window"; | 136 NOTREACHED() << L"Failed to initialize about window"; |
| 136 return; | 137 return; |
| 137 } | 138 } |
| 138 | 139 |
| 139 current_version_ = version_info->file_version(); | 140 current_version_ = version_info->file_version(); |
| 140 | 141 |
| 141 string16 version_modifier = platform_util::GetVersionStringModifier(); | 142 string16 version_modifier = platform_util::GetVersionStringModifier(); |
| 142 if (version_modifier.length()) { | 143 if (version_modifier.length()) { |
| 143 version_details_ += L" "; | 144 version_details_ += L" "; |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 View* parent = GetParent(); | 793 View* parent = GetParent(); |
| 793 parent->Layout(); | 794 parent->Layout(); |
| 794 | 795 |
| 795 // Check button may have appeared/disappeared. We cannot call this during | 796 // Check button may have appeared/disappeared. We cannot call this during |
| 796 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 797 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
| 797 if (window()) | 798 if (window()) |
| 798 GetDialogClientView()->UpdateDialogButtons(); | 799 GetDialogClientView()->UpdateDialogButtons(); |
| 799 } | 800 } |
| 800 | 801 |
| 801 #endif | 802 #endif |
| OLD | NEW |