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 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "chrome/browser/browser_list.h" | 17 #include "chrome/browser/browser_list.h" |
18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/metrics/user_metrics.h" | 19 #include "chrome/browser/metrics/user_metrics.h" |
20 #include "chrome/browser/platform_util.h" | 20 #include "chrome/browser/platform_util.h" |
21 #include "chrome/browser/prefs/pref_service.h" | 21 #include "chrome/browser/prefs/pref_service.h" |
22 #include "chrome/browser/views/accessible_view_helper.h" | 22 #include "chrome/browser/views/accessible_view_helper.h" |
| 23 #include "chrome/browser/views/window.h" |
23 #include "chrome/common/chrome_constants.h" | 24 #include "chrome/common/chrome_constants.h" |
24 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
25 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
26 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
27 #include "gfx/canvas.h" | 28 #include "gfx/canvas.h" |
28 #include "grit/chromium_strings.h" | 29 #include "grit/chromium_strings.h" |
29 #include "grit/generated_resources.h" | 30 #include "grit/generated_resources.h" |
30 #include "grit/locale_settings.h" | 31 #include "grit/locale_settings.h" |
31 #include "grit/theme_resources.h" | 32 #include "grit/theme_resources.h" |
32 #include "views/controls/textfield/textfield.h" | 33 #include "views/controls/textfield/textfield.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 75 |
75 } // namespace | 76 } // namespace |
76 | 77 |
77 namespace browser { | 78 namespace browser { |
78 | 79 |
79 // Declared in browser_dialogs.h so that others don't | 80 // Declared in browser_dialogs.h so that others don't |
80 // need to depend on our .h. | 81 // need to depend on our .h. |
81 views::Window* ShowAboutChromeView(gfx::NativeWindow parent, | 82 views::Window* ShowAboutChromeView(gfx::NativeWindow parent, |
82 Profile* profile) { | 83 Profile* profile) { |
83 views::Window* about_chrome_window = | 84 views::Window* about_chrome_window = |
84 views::Window::CreateChromeWindow(parent, | 85 browser::CreateViewsWindow(parent, |
85 gfx::Rect(), | 86 gfx::Rect(), |
86 new AboutChromeView(profile)); | 87 new AboutChromeView(profile)); |
87 about_chrome_window->Show(); | 88 about_chrome_window->Show(); |
88 return about_chrome_window; | 89 return about_chrome_window; |
89 } | 90 } |
90 | 91 |
91 } // namespace browser | 92 } // namespace browser |
92 | 93 |
93 //////////////////////////////////////////////////////////////////////////////// | 94 //////////////////////////////////////////////////////////////////////////////// |
94 // AboutChromeView, public: | 95 // AboutChromeView, public: |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 View* parent = GetParent(); | 809 View* parent = GetParent(); |
809 parent->Layout(); | 810 parent->Layout(); |
810 | 811 |
811 // Check button may have appeared/disappeared. We cannot call this during | 812 // Check button may have appeared/disappeared. We cannot call this during |
812 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 813 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
813 if (window()) | 814 if (window()) |
814 GetDialogClientView()->UpdateDialogButtons(); | 815 GetDialogClientView()->UpdateDialogButtons(); |
815 } | 816 } |
816 | 817 |
817 #endif | 818 #endif |
OLD | NEW |