OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 #include "ui/base/resource/resource_bundle_android.h" | 174 #include "ui/base/resource/resource_bundle_android.h" |
175 #else | 175 #else |
176 #include "chrome/browser/feedback/feedback_profile_observer.h" | 176 #include "chrome/browser/feedback/feedback_profile_observer.h" |
177 #endif // defined(OS_ANDROID) | 177 #endif // defined(OS_ANDROID) |
178 | 178 |
179 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 179 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
180 #include "chrome/browser/first_run/upgrade_util_linux.h" | 180 #include "chrome/browser/first_run/upgrade_util_linux.h" |
181 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 181 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) |
182 | 182 |
183 #if defined(OS_CHROMEOS) | 183 #if defined(OS_CHROMEOS) |
| 184 #include "ash/material_design/material_design_controller.h" |
184 #include "chrome/browser/chromeos/settings/cros_settings.h" | 185 #include "chrome/browser/chromeos/settings/cros_settings.h" |
185 #include "chromeos/chromeos_switches.h" | 186 #include "chromeos/chromeos_switches.h" |
186 #include "chromeos/settings/cros_settings_names.h" | 187 #include "chromeos/settings/cros_settings_names.h" |
187 #endif // defined(OS_CHROMEOS) | 188 #endif // defined(OS_CHROMEOS) |
188 | 189 |
189 // TODO(port): several win-only methods have been pulled out of this, but | 190 // TODO(port): several win-only methods have been pulled out of this, but |
190 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 191 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
191 // other platforms. For now, it's just a stub. This is a serious work in | 192 // other platforms. For now, it's just a stub. This is a serious work in |
192 // progress and should not be taken as an indication of a real refactoring. | 193 // progress and should not be taken as an indication of a real refactoring. |
193 | 194 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 g_browser_process->local_state()); | 973 g_browser_process->local_state()); |
973 about_flags::ConvertFlagsToSwitches(&flags_storage_, | 974 about_flags::ConvertFlagsToSwitches(&flags_storage_, |
974 base::CommandLine::ForCurrentProcess(), | 975 base::CommandLine::ForCurrentProcess(), |
975 flags_ui::kAddSentinels); | 976 flags_ui::kAddSentinels); |
976 } | 977 } |
977 #endif // !defined(OS_CHROMEOS) | 978 #endif // !defined(OS_CHROMEOS) |
978 // The MaterialDesignController needs to look at command line flags, which | 979 // The MaterialDesignController needs to look at command line flags, which |
979 // are not available until this point. Now that they are, proceed with | 980 // are not available until this point. Now that they are, proceed with |
980 // initializing the MaterialDesignController. | 981 // initializing the MaterialDesignController. |
981 ui::MaterialDesignController::Initialize(); | 982 ui::MaterialDesignController::Initialize(); |
| 983 #if defined(OS_CHROMEOS) |
| 984 ash::MaterialDesignController::Initialize(); |
| 985 #endif // !defined(OS_CHROMEOS) |
982 | 986 |
983 #if defined(OS_MACOSX) | 987 #if defined(OS_MACOSX) |
984 // Material Design resource packs can be loaded now that command line flags | 988 // Material Design resource packs can be loaded now that command line flags |
985 // are set. See https://crbug.com/585290 . | 989 // are set. See https://crbug.com/585290 . |
986 ui::ResourceBundle::GetSharedInstance().LoadMaterialDesignResources(); | 990 ui::ResourceBundle::GetSharedInstance().LoadMaterialDesignResources(); |
987 #endif | 991 #endif |
988 | 992 |
989 #if defined(OS_WIN) | 993 #if defined(OS_WIN) |
990 // This is needed to enable ETW exporting when requested in about:flags. | 994 // This is needed to enable ETW exporting when requested in about:flags. |
991 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag | 995 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 chromeos::CrosSettings::Shutdown(); | 1950 chromeos::CrosSettings::Shutdown(); |
1947 #endif // defined(OS_CHROMEOS) | 1951 #endif // defined(OS_CHROMEOS) |
1948 #endif // defined(OS_ANDROID) | 1952 #endif // defined(OS_ANDROID) |
1949 } | 1953 } |
1950 | 1954 |
1951 // Public members: | 1955 // Public members: |
1952 | 1956 |
1953 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1957 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1954 chrome_extra_parts_.push_back(parts); | 1958 chrome_extra_parts_.push_back(parts); |
1955 } | 1959 } |
OLD | NEW |