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

Side by Side Diff: ui/base/resource/material_design/material_design_controller.h

Issue 1164333002: ToolbarView MaterialDesign in ThemeProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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_RESOURCE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ 5 #ifndef UI_BASE_RESOURCE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
6 #define UI_BASE_RESOURCE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ 6 #define UI_BASE_RESOURCE_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
11 namespace ui { 11 namespace ui {
12 12
13 namespace test { 13 namespace test {
14 class MaterialDesignControllerTestAPI; 14 class MaterialDesignControllerTestAPI;
15 } // namespace test 15 } // namespace test
16 16
17 // Central controller to handle material design modes. 17 // Central controller to handle material design modes.
18 class UI_BASE_EXPORT MaterialDesignController { 18 class UI_BASE_EXPORT MaterialDesignController {
19 public: 19 public:
20 // The different material design modes. 20 // The different material design modes. The order cannot be changed without
21 // updating references as these are used as array indices.
21 enum class Mode { 22 enum class Mode {
23 // Classic, non-material design.
24 NON_MATERIAL = 0,
22 // Basic material design. 25 // Basic material design.
23 MATERIAL, 26 MATERIAL = 1,
24 // Material design targeted at mouse/touch hybrid devices. 27 // Material design targeted at mouse/touch hybrid devices.
25 MATERIAL_HYBRID, 28 MATERIAL_HYBRID = 2
26 // Classic, non-material design.
27 NON_MATERIAL
28 }; 29 };
29 30
30 // Get the current Mode that should be used by the system. 31 // Get the current Mode that should be used by the system.
31 static Mode GetMode(); 32 static Mode GetMode();
32 33
33 private: 34 private:
34 friend class test::MaterialDesignControllerTestAPI; 35 friend class test::MaterialDesignControllerTestAPI;
35 36
36 // Tracks whether |mode_| has been initialized. This is necessary so tests can 37 // Tracks whether |mode_| has been initialized. This is necessary so tests can
37 // reset the state back to a clean state during tear down. 38 // reset the state back to a clean state during tear down.
(...skipping 16 matching lines...) Expand all
54 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be 55 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be
55 // used by tests to directly set the mode. 56 // used by tests to directly set the mode.
56 static void SetMode(Mode mode); 57 static void SetMode(Mode mode);
57 58
58 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController); 59 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController);
59 }; 60 };
60 61
61 } // namespace ui 62 } // namespace ui
62 63
63 #endif // UI_BASE_RESOURCE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ 64 #endif // UI_BASE_RESOURCE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
OLDNEW
« chrome/browser/themes/theme_properties.cc ('K') | « chrome/browser/ui/views/toolbar/toolbar_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698