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

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

Issue 1926943002: Introduce new flag to control usage of MD in secondary (not top-chrome) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only 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: 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();
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view_md.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