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 { |
| + // Only apply the Material Design modes to primary UI (toolbar, etc.). |
| + PRIMARY = 0, |
| + // Apply the Material Design modes to secondary UI (bubble contents, etc.). |
| + 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/04/27 23:06:05
You would probably want to save / restore the mode
Evan Stade
2016/04/27 23:20:40
I think this would make sense as soon as we decide
varkha
2016/04/27 23:30:58
True but easy to forget and the results may be fla
|
| + |
| // Declarations only. Do not allow construction of an object. |
| MaterialDesignController(); |
| ~MaterialDesignController(); |