OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
17 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
19 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
20 #include "chrome/browser/google/google_util.h" | 20 #include "chrome/browser/google/google_util.h" |
21 #include "chrome/browser/prefs/pref_service.h" | 21 #include "chrome/browser/prefs/pref_service.h" |
22 #include "chrome/browser/ui/browser_list.h" | 22 #include "chrome/browser/ui/browser_list.h" |
23 #include "chrome/browser/ui/dialog_style.h" | |
23 #include "chrome/browser/ui/views/window.h" | 24 #include "chrome/browser/ui/views/window.h" |
24 #include "chrome/common/chrome_constants.h" | 25 #include "chrome/common/chrome_constants.h" |
25 #include "chrome/common/chrome_version_info.h" | 26 #include "chrome/common/chrome_version_info.h" |
26 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
27 #include "chrome/installer/util/browser_distribution.h" | 28 #include "chrome/installer/util/browser_distribution.h" |
28 #include "content/browser/user_metrics.h" | 29 #include "content/browser/user_metrics.h" |
29 #include "grit/chromium_strings.h" | 30 #include "grit/chromium_strings.h" |
30 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
31 #include "grit/locale_settings.h" | 32 #include "grit/locale_settings.h" |
32 #include "grit/theme_resources.h" | 33 #include "grit/theme_resources.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 } | 84 } |
84 | 85 |
85 } // namespace | 86 } // namespace |
86 | 87 |
87 namespace browser { | 88 namespace browser { |
88 | 89 |
89 // Declared in browser_dialogs.h so that others don't | 90 // Declared in browser_dialogs.h so that others don't |
90 // need to depend on our .h. | 91 // need to depend on our .h. |
91 views::Widget* ShowAboutChromeView(gfx::NativeWindow parent, Profile* profile) { | 92 views::Widget* ShowAboutChromeView(gfx::NativeWindow parent, Profile* profile) { |
92 views::Widget* about_chrome_window = | 93 views::Widget* about_chrome_window = |
93 browser::CreateViewsWindow(parent, new AboutChromeView(profile)); | 94 browser::CreateViewsWindow(parent, new AboutChromeView(profile), |
95 STYLE_GENERIC); | |
flackr
2011/11/21 20:43:31
One argument per line.
bshe
2011/11/22 16:26:24
Done.
| |
94 about_chrome_window->Show(); | 96 about_chrome_window->Show(); |
95 return about_chrome_window; | 97 return about_chrome_window; |
96 } | 98 } |
97 | 99 |
98 } // namespace browser | 100 } // namespace browser |
99 | 101 |
100 //////////////////////////////////////////////////////////////////////////////// | 102 //////////////////////////////////////////////////////////////////////////////// |
101 // AboutChromeView, public: | 103 // AboutChromeView, public: |
102 | 104 |
103 AboutChromeView::AboutChromeView(Profile* profile) | 105 AboutChromeView::AboutChromeView(Profile* profile) |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
790 int height = error_label_->GetHeightForWidth( | 792 int height = error_label_->GetHeightForWidth( |
791 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + | 793 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + |
792 views::kRelatedControlVerticalSpacing; | 794 views::kRelatedControlVerticalSpacing; |
793 window_rect.set_height(window_rect.height() + height); | 795 window_rect.set_height(window_rect.height() + height); |
794 GetWidget()->SetBounds(window_rect); | 796 GetWidget()->SetBounds(window_rect); |
795 | 797 |
796 return height; | 798 return height; |
797 } | 799 } |
798 | 800 |
799 #endif | 801 #endif |
OLD | NEW |