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

Side by Side Diff: ui/views/controls/button/md_text_button.h

Issue 2389453002: Remove IsModeMaterial checks in ui/views/ (Closed)
Patch Set: oops Created 4 years, 2 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_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/optional.h" 10 #include "base/optional.h"
11 #include "ui/views/controls/button/label_button.h" 11 #include "ui/views/controls/button/label_button.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 namespace internal { 15 namespace internal {
16 class MdFocusRing; 16 class MdFocusRing;
17 } // namespace internal 17 } // namespace internal
18 18
19 // A button class that implements the Material Design text button spec. 19 // A button class that implements the Material Design text button spec.
20 class VIEWS_EXPORT MdTextButton : public LabelButton { 20 class VIEWS_EXPORT MdTextButton : public LabelButton {
21 public: 21 public:
22 // Creates a normal STYLE_BUTTON LabelButton in pre-MD, or an MdTextButton
23 // in MD mode.
24 static LabelButton* CreateStandardButton(ButtonListener* listener,
25 const base::string16& text);
26 // As above, but only creates an MdTextButton if MD is enabled in the 22 // As above, but only creates an MdTextButton if MD is enabled in the
27 // secondary UI (as opposed to just "top chrome"/"primary" UI). 23 // secondary UI (as opposed to just "top chrome"/"primary" UI).
28 static LabelButton* CreateSecondaryUiButton(ButtonListener* listener, 24 static LabelButton* CreateSecondaryUiButton(ButtonListener* listener,
29 const base::string16& text); 25 const base::string16& text);
30 static LabelButton* CreateSecondaryUiBlueButton(ButtonListener* listener, 26 static LabelButton* CreateSecondaryUiBlueButton(ButtonListener* listener,
31 const base::string16& text); 27 const base::string16& text);
32 static MdTextButton* Create(ButtonListener* listener, 28 static MdTextButton* Create(ButtonListener* listener,
33 const base::string16& text); 29 const base::string16& text);
34 30
35 // See |is_prominent_|. 31 // See |is_prominent_|.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 69
74 // When set, this provides the background color. 70 // When set, this provides the background color.
75 base::Optional<SkColor> bg_color_override_; 71 base::Optional<SkColor> bg_color_override_;
76 72
77 DISALLOW_COPY_AND_ASSIGN(MdTextButton); 73 DISALLOW_COPY_AND_ASSIGN(MdTextButton);
78 }; 74 };
79 75
80 } // namespace views 76 } // namespace views
81 77
82 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 78 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698