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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 } | 1031 } |
1032 #endif // !defined(OS_CHROMEOS) | 1032 #endif // !defined(OS_CHROMEOS) |
1033 // The MaterialDesignController needs to look at command line flags, which | 1033 // The MaterialDesignController needs to look at command line flags, which |
1034 // are not available until this point. Now that they are, proceed with | 1034 // are not available until this point. Now that they are, proceed with |
1035 // initializing the MaterialDesignController. | 1035 // initializing the MaterialDesignController. |
1036 ui::MaterialDesignController::Initialize(); | 1036 ui::MaterialDesignController::Initialize(); |
1037 #if defined(OS_CHROMEOS) | 1037 #if defined(OS_CHROMEOS) |
1038 ash::MaterialDesignController::Initialize(); | 1038 ash::MaterialDesignController::Initialize(); |
1039 #endif // !defined(OS_CHROMEOS) | 1039 #endif // !defined(OS_CHROMEOS) |
1040 | 1040 |
1041 #if defined(OS_MACOSX) | |
1042 // Material Design resource packs can be loaded now that command line flags | |
1043 // are set. See https://crbug.com/585290 . | |
1044 ui::ResourceBundle::GetSharedInstance().LoadMaterialDesignResources(); | |
1045 #endif | |
1046 | |
1047 #if defined(OS_WIN) | 1041 #if defined(OS_WIN) |
1048 // This is needed to enable ETW exporting when requested in about:flags. | 1042 // This is needed to enable ETW exporting when requested in about:flags. |
1049 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag | 1043 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag |
1050 // is present on the command line but flags in about:flags are converted only | 1044 // is present on the command line but flags in about:flags are converted only |
1051 // after this function runs. Note that this starts exporting later which | 1045 // after this function runs. Note that this starts exporting later which |
1052 // affects tracing the browser startup. Also, this is only relevant for the | 1046 // affects tracing the browser startup. Also, this is only relevant for the |
1053 // browser process, as other processes will get all the flags on their command | 1047 // browser process, as other processes will get all the flags on their command |
1054 // line regardless of the origin (command line or about:flags). | 1048 // line regardless of the origin (command line or about:flags). |
1055 if (parsed_command_line().HasSwitch(switches::kTraceExportEventsToETW)) | 1049 if (parsed_command_line().HasSwitch(switches::kTraceExportEventsToETW)) |
1056 base::trace_event::TraceEventETWExport::EnableETWExport(); | 1050 base::trace_event::TraceEventETWExport::EnableETWExport(); |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2058 chromeos::CrosSettings::Shutdown(); | 2052 chromeos::CrosSettings::Shutdown(); |
2059 #endif // defined(OS_CHROMEOS) | 2053 #endif // defined(OS_CHROMEOS) |
2060 #endif // defined(OS_ANDROID) | 2054 #endif // defined(OS_ANDROID) |
2061 } | 2055 } |
2062 | 2056 |
2063 // Public members: | 2057 // Public members: |
2064 | 2058 |
2065 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2059 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2066 chrome_extra_parts_.push_back(parts); | 2060 chrome_extra_parts_.push_back(parts); |
2067 } | 2061 } |
OLD | NEW |