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

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

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
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/base/material_design/material_design_controller.cc » ('j') | 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 9ef61c0c4e546250afeb927a3f1c9a4c39c5673c..fb58f0bf25a4b9dd984442e8f7ae77a87aa11cea 100644
--- a/ui/base/material_design/material_design_controller.h
+++ b/ui/base/material_design/material_design_controller.h
@@ -28,6 +28,9 @@ class UI_BASE_EXPORT MaterialDesignController {
MATERIAL_HYBRID = 2
};
+ // Initializes |mode_|. Must be called before checking |mode_|.
+ static void Initialize();
+
// Get the current Mode that should be used by the system.
static Mode GetMode();
@@ -51,12 +54,9 @@ class UI_BASE_EXPORT MaterialDesignController {
MaterialDesignController();
~MaterialDesignController();
- // Initializes |mode_|.
- static void InitializeMode();
-
- // Resets the Mode state to uninitialized. To be used by tests to cleanup
- // global state.
- static void UninitializeMode();
+ // Resets the initialization state to uninitialized. To be used by tests to
+ // allow calling Initialize() more than once.
+ static void Uninitialize();
// Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be
// used by tests to directly set the mode.
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/base/material_design/material_design_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698