Chromium Code Reviews| 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 fb58f0bf25a4b9dd984442e8f7ae77a87aa11cea..f9d6ae6aa711a8761717d2f94f0c936e49bfe545 100644 |
| --- a/ui/base/material_design/material_design_controller.h |
| +++ b/ui/base/material_design/material_design_controller.h |
| @@ -28,6 +28,14 @@ class UI_BASE_EXPORT MaterialDesignController { |
| MATERIAL_HYBRID = 2 |
| }; |
| + // The extent to which the mode applies. |
| + enum Extent { |
|
sky
2016/05/04 17:35:39
Can this be private? Also, if secondary implicitly
sky
2016/05/04 17:35:39
nit: enum class
Evan Stade
2016/05/04 22:51:04
Done.
|
| + // Only apply the Material Design modes to primary UI (toolbar, etc.). |
| + PRIMARY = 0, |
|
sky
2016/05/04 17:35:39
nit: it would be clearer if this included UI in it
|
| + // Apply the Material Design modes to secondary UI (bubble contents, etc.). |
|
sky
2016/05/04 17:35:39
I assume this includes primary as well?
|
| + SECONDARY = 1, |
| + }; |
| + |
| // Initializes |mode_|. Must be called before checking |mode_|. |
| static void Initialize(); |
| @@ -37,6 +45,10 @@ class UI_BASE_EXPORT MaterialDesignController { |
| // Returns true if the current mode is a material design variant. |
| static bool IsModeMaterial(); |
| + // Returns true if the current mode is a material design variant and this mode |
| + // should be extended to cover secondary UI. |
| + static bool IsSecondaryUiMaterial(); |
| + |
| // Returns the per-platform default material design variant. |
| static Mode DefaultMode(); |
| @@ -50,6 +62,9 @@ class UI_BASE_EXPORT MaterialDesignController { |
| // The current Mode to be used by the system. |
| static Mode mode_; |
| + // The extent to apply |mode_|. |
| + static Extent extent_; |
|
varkha
2016/05/04 17:46:02
Maybe just a boolean extend_to_secondary_ui_ or so
|
| + |
| // Declarations only. Do not allow construction of an object. |
| MaterialDesignController(); |
| ~MaterialDesignController(); |