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

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

Issue 1633733004: Use browser top chrome material design by default on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | ui/base/material_design/material_design_controller.cc » ('j') | 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
(...skipping 16 matching lines...) Expand all
27 // Material design targeted at mouse/touch hybrid devices. 27 // Material design targeted at mouse/touch hybrid devices.
28 MATERIAL_HYBRID = 2 28 MATERIAL_HYBRID = 2
29 }; 29 };
30 30
31 // Get the current Mode that should be used by the system. 31 // Get the current Mode that should be used by the system.
32 static Mode GetMode(); 32 static Mode GetMode();
33 33
34 // Returns true if the current mode is a material design variant. 34 // Returns true if the current mode is a material design variant.
35 static bool IsModeMaterial(); 35 static bool IsModeMaterial();
36 36
37 // Returns the per-platform default material design variant.
38 static Mode DefaultMode();
39
37 private: 40 private:
38 friend class test::MaterialDesignControllerTestAPI; 41 friend class test::MaterialDesignControllerTestAPI;
39 42
40 // Tracks whether |mode_| has been initialized. This is necessary so tests can 43 // Tracks whether |mode_| has been initialized. This is necessary so tests can
41 // reset the state back to a clean state during tear down. 44 // reset the state back to a clean state during tear down.
42 static bool is_mode_initialized_; 45 static bool is_mode_initialized_;
43 46
44 // The current Mode to be used by the system. 47 // The current Mode to be used by the system.
45 static Mode mode_; 48 static Mode mode_;
46 49
(...skipping 11 matching lines...) Expand all
58 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be 61 // Set |mode_| to |mode| and updates |is_mode_initialized_| to true. Can be
59 // used by tests to directly set the mode. 62 // used by tests to directly set the mode.
60 static void SetMode(Mode mode); 63 static void SetMode(Mode mode);
61 64
62 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController); 65 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController);
63 }; 66 };
64 67
65 } // namespace ui 68 } // namespace ui
66 69
67 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_ 70 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.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