| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ | 5 #ifndef UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ |
| 6 #define UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ | 6 #define UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/base/ui_base_export.h" | 9 #include "ui/base/ui_base_export.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Material design targeted at mouse/touch hybrid devices. | 25 // Material design targeted at mouse/touch hybrid devices. |
| 26 MATERIAL_HYBRID = 1 | 26 MATERIAL_HYBRID = 1 |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 // Initializes |mode_|. Must be called before checking |mode_|. | 29 // Initializes |mode_|. Must be called before checking |mode_|. |
| 30 static void Initialize(); | 30 static void Initialize(); |
| 31 | 31 |
| 32 // Get the current Mode that should be used by the system. | 32 // Get the current Mode that should be used by the system. |
| 33 static Mode GetMode(); | 33 static Mode GetMode(); |
| 34 | 34 |
| 35 // Returns true. TODO(estade): remove. | |
| 36 static bool IsModeMaterial(); | |
| 37 | |
| 38 // Returns true if the current mode is a material design variant and this mode | 35 // Returns true if the current mode is a material design variant and this mode |
| 39 // should be extended to cover secondary UI. | 36 // should be extended to cover secondary UI. |
| 40 static bool IsSecondaryUiMaterial(); | 37 static bool IsSecondaryUiMaterial(); |
| 41 | 38 |
| 42 // Returns the per-platform default material design variant. | 39 // Returns the per-platform default material design variant. |
| 43 static Mode DefaultMode(); | 40 static Mode DefaultMode(); |
| 44 | 41 |
| 45 static bool is_mode_initialized() { return is_mode_initialized_; } | 42 static bool is_mode_initialized() { return is_mode_initialized_; } |
| 46 | 43 |
| 47 private: | 44 private: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 70 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be | 67 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be |
| 71 // used by tests to directly set the mode. | 68 // used by tests to directly set the mode. |
| 72 static void SetMode(Mode mode); | 69 static void SetMode(Mode mode); |
| 73 | 70 |
| 74 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController); | 71 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController); |
| 75 }; | 72 }; |
| 76 | 73 |
| 77 } // namespace ui | 74 } // namespace ui |
| 78 | 75 |
| 79 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ | 76 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ |
| OLD | NEW |