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

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

Issue 2464063002: Revert of Some more pre-material cleanups (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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. The order cannot be changed without 20 // The different material design modes. The order cannot be changed without
21 // updating references as these are used as array indices. 21 // updating references as these are used as array indices.
22 enum Mode { 22 enum Mode {
23 // Basic material design. 23 // Basic material design.
24 MATERIAL_NORMAL = 0, 24 MATERIAL_NORMAL = 1,
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 = 2
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. 35 // Returns true. TODO(estade): remove.
36 static bool IsModeMaterial(); 36 static bool IsModeMaterial();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be 70 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be
71 // used by tests to directly set the mode. 71 // used by tests to directly set the mode.
72 static void SetMode(Mode mode); 72 static void SetMode(Mode mode);
73 73
74 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController); 74 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController);
75 }; 75 };
76 76
77 } // namespace ui 77 } // namespace ui
78 78
79 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ 79 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698