Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1878973002: [reland] Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made it possible to restore MaterialDesignController state after each test case (nits) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 5fd3d13bcecf419f0ae900136b6c89c63ef36a66..273252ef2c04c1687e91268b74fd5fc49df6fd9d 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -157,6 +157,7 @@
#include "net/url_request/url_request.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/layout.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/strings/grit/app_locale_settings.h"
@@ -974,12 +975,14 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
flags_ui::kAddSentinels);
}
#endif // !defined(OS_CHROMEOS)
-
-#if defined(OS_MACOSX)
// The MaterialDesignController needs to look at command line flags, which
// are not available until this point. Now that they are, proceed with
- // (conditionally) loading the Material Design resource packs. See
- // https://crbug.com/585290 .
+ // initializing the MaterialDesignController.
+ ui::MaterialDesignController::Initialize();
+
+#if defined(OS_MACOSX)
+ // Material Design resource packs can be loaded now that command line flags
+ // are set. See https://crbug.com/585290 .
ui::ResourceBundle::GetSharedInstance().LoadMaterialDesignResources();
#endif
« no previous file with comments | « chrome/app/resources/resources_unittest.cc ('k') | chrome/browser/extensions/extension_action_icon_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698