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

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

Issue 1188713007: Moved --top-chrome-md command line switch from chrome_switches to ui_base_switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
6 #define UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
7
8 #include "base/macros.h"
9 #include "ui/base/ui_base_export.h"
10
11 namespace ui {
12
13 namespace test {
14 class MaterialDesignControllerTestAPI;
15 } // namespace test
16
17 // Central controller to handle material design look and feel.
18 class UI_BASE_EXPORT MaterialDesignController {
19 public:
20 // The different look and feel options.
21 enum class LookAndFeel {
tdanderson 2015/06/18 20:54:23 +1 to Gene's suggestion of using "mode" instead of
bruthig 2015/06/22 18:51:11 Done.
22 // Basic material design look and feel.
23 MATERIAL,
24 // Material design look and feel targeted for convertible devices.
tdanderson 2015/06/18 20:54:23 I'd re-phrase the comment here (and in ui_base_swi
bruthig 2015/06/22 18:51:11 Done.
25 HYBRID,
26 // Classic, non-material, look and feel.
27 CLASSIC
tdanderson 2015/06/18 20:54:24 Naming these MATERIAL, MATERIAL_HYBRID, and NON_MA
bruthig 2015/06/22 18:51:11 Done.
28 };
29
30 // Get the current LookAndFeel that should be used by the system.
31 static LookAndFeel GetLookAndFeel();
32
33 private:
34 friend class test::MaterialDesignControllerTestAPI;
35
36 // Tracks whether |look_and_feel_| has been initialized.
37 static bool is_look_and_feel_initialized_;
tdanderson 2015/06/18 20:54:23 Perhaps include a comment about why this is needed
bruthig 2015/06/22 18:51:11 Done.
38
39 // The current look and feel to be used by the system.
40 static LookAndFeel look_and_feel_;
41
42 // Declarations only. Do not allow construction of an object.
43 MaterialDesignController();
44 ~MaterialDesignController();
45
46 // Initializes |look_and_feel_|.
47 static void InitializeLookAndFeel();
48
49 // Resets the look and feel state to uninitialized. To be used by tests to
50 // cleanup global state.
51 static void UninitializeLookAndFeel();
52
53 // Set |look_and_feel_| to |look_and_feel| and updates
54 // |is_look_and_feel_initialized_| to true. Can be used by tests to directly
55 // set the look and feel.
56 static void SetLookAndFeel(LookAndFeel look_and_feel);
57
58 DISALLOW_COPY_AND_ASSIGN(MaterialDesignController);
59 };
60
61 } // namespace ui
62
63 #endif // UI_BASE_MATERIAL_DESIGN_MATERIAL_DESIGN_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698