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) | |
8 #include <commdlg.h> | |
9 #endif // defined(OS_WIN) | |
10 | |
7 #include <algorithm> | 11 #include <algorithm> |
8 #include <string> | 12 #include <string> |
9 #include <vector> | 13 #include <vector> |
10 | 14 |
11 #include "app/l10n_util.h" | 15 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 16 #include "app/resource_bundle.h" |
13 #include "base/callback.h" | 17 #include "base/callback.h" |
14 #include "base/i18n/rtl.h" | 18 #include "base/i18n/rtl.h" |
15 #include "base/string_number_conversions.h" | 19 #include "base/string_number_conversions.h" |
16 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
17 #include "base/win/windows_version.h" | 21 #include "base/win/windows_version.h" |
18 #include "chrome/browser/browser_list.h" | 22 #include "chrome/browser/browser_list.h" |
19 #include "chrome/browser/browser_process.h" | |
20 #include "chrome/browser/metrics/user_metrics.h" | 23 #include "chrome/browser/metrics/user_metrics.h" |
21 #include "chrome/browser/platform_util.h" | 24 #include "chrome/browser/platform_util.h" |
22 #include "chrome/browser/prefs/pref_service.h" | 25 #include "chrome/browser/prefs/pref_service.h" |
23 #include "chrome/browser/views/accessible_view_helper.h" | 26 #include "chrome/browser/views/accessible_view_helper.h" |
24 #include "chrome/browser/views/window.h" | 27 #include "chrome/browser/views/window.h" |
25 #include "chrome/common/chrome_constants.h" | 28 #include "chrome/common/chrome_constants.h" |
26 #include "chrome/common/chrome_version_info.h" | 29 #include "chrome/common/chrome_version_info.h" |
27 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
28 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
29 #include "chrome/installer/util/browser_distribution.h" | 32 #include "chrome/installer/util/browser_distribution.h" |
30 #include "gfx/canvas.h" | 33 #include "gfx/canvas.h" |
31 #include "grit/chromium_strings.h" | 34 #include "grit/chromium_strings.h" |
32 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
33 #include "grit/locale_settings.h" | 36 #include "grit/locale_settings.h" |
34 #include "grit/theme_resources.h" | 37 #include "grit/theme_resources.h" |
35 #include "views/controls/textfield/textfield.h" | 38 #include "views/controls/textfield/textfield.h" |
36 #include "views/controls/throbber.h" | 39 #include "views/controls/throbber.h" |
37 #include "views/standard_layout.h" | 40 #include "views/standard_layout.h" |
38 #include "views/view_text_utils.h" | 41 #include "views/view_text_utils.h" |
39 #include "views/widget/widget.h" | 42 #include "views/widget/widget.h" |
40 #include "views/window/window.h" | 43 #include "views/window/window.h" |
41 #include "webkit/glue/webkit_glue.h" | 44 #include "webkit/glue/webkit_glue.h" |
42 | 45 |
43 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
James Hawkins
2010/12/05 17:58:47
#ifdef includes should be inline with the rest of
| |
44 #include <commdlg.h> | |
45 | |
46 #include "base/win_util.h" | 47 #include "base/win_util.h" |
47 #include "chrome/browser/views/restart_message_box.h" | 48 #include "chrome/browser/views/restart_message_box.h" |
48 #include "chrome/installer/util/install_util.h" | 49 #include "chrome/installer/util/install_util.h" |
49 #endif | 50 #endif // defined(OS_WIN) |
51 | |
52 #if defined(OS_WIN) || defined(OS_CHROMEOS) | |
53 #include "chrome/browser/browser_process.h" | |
54 #endif // defined(OS_WIN) || defined(OS_CHROMEOS) | |
50 | 55 |
51 namespace { | 56 namespace { |
52 // The pixel width of the version text field. Ideally, we'd like to have the | 57 // The pixel width of the version text field. Ideally, we'd like to have the |
53 // bounds set to the edge of the icon. However, the icon is not a view but a | 58 // bounds set to the edge of the icon. However, the icon is not a view but a |
54 // part of the background, so we have to hard code the width to make sure | 59 // part of the background, so we have to hard code the width to make sure |
55 // the version field doesn't overlap it. | 60 // the version field doesn't overlap it. |
56 const int kVersionFieldWidth = 195; | 61 const int kVersionFieldWidth = 195; |
57 | 62 |
58 // These are used as placeholder text around the links in the text in the about | 63 // These are used as placeholder text around the links in the text in the about |
59 // dialog. | 64 // dialog. |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
815 View* parent = GetParent(); | 820 View* parent = GetParent(); |
816 parent->Layout(); | 821 parent->Layout(); |
817 | 822 |
818 // Check button may have appeared/disappeared. We cannot call this during | 823 // Check button may have appeared/disappeared. We cannot call this during |
819 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 824 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
820 if (window()) | 825 if (window()) |
821 GetDialogClientView()->UpdateDialogButtons(); | 826 GetDialogClientView()->UpdateDialogButtons(); |
822 } | 827 } |
823 | 828 |
824 #endif | 829 #endif |
OLD | NEW |