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

Unified Diff: ui/base/material_design/material_design_controller.h

Issue 2171873002: [top-chrome-md] Allows UpdateMaterialDesignColors to be called before MDC::Initialize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/material_design/material_design_controller.h
diff --git a/ui/base/material_design/material_design_controller.h b/ui/base/material_design/material_design_controller.h
index 46363f776b1a3622726865439f3f60def1e5db5c..877333b0194975b7fe529bc9ca583a610ad98f89 100644
--- a/ui/base/material_design/material_design_controller.h
+++ b/ui/base/material_design/material_design_controller.h
@@ -44,11 +44,14 @@ class UI_BASE_EXPORT MaterialDesignController {
// Returns the per-platform default material design variant.
static Mode DefaultMode();
+ static bool is_mode_initialized() { return is_mode_initialized_; }
+
private:
friend class test::MaterialDesignControllerTestAPI;
- // Tracks whether |mode_| has been initialized. This is necessary so tests can
- // reset the state back to a clean state during tear down.
+ // Tracks whether |mode_| has been initialized. This is necessary to avoid
+ // checking the |mode_| early in initialization before a call to Initialize().
+ // Tests can use it to reset the state back to a clean state during tear down.
static bool is_mode_initialized_;
// The current Mode to be used by the system.
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698