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

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

Issue 1978403003: [MD] Eliminate as many SetStyle(STYLE_BUTTON) calls as possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 "ui/views/animation/button_ink_drop_delegate.h" 10 #include "ui/views/animation/button_ink_drop_delegate.h"
(...skipping 13 matching lines...) Expand all
24 }; 24 };
25 25
26 // Creates a normal STYLE_BUTTON LabelButton in pre-MD, or an MdTextButton 26 // Creates a normal STYLE_BUTTON LabelButton in pre-MD, or an MdTextButton
27 // in MD mode. 27 // in MD mode.
28 static LabelButton* CreateStandardButton(ButtonListener* listener, 28 static LabelButton* CreateStandardButton(ButtonListener* listener,
29 const base::string16& text); 29 const base::string16& text);
30 // As above, but only creates an MdTextButton if MD is enabled in the 30 // As above, but only creates an MdTextButton if MD is enabled in the
31 // secondary UI (as opposed to just "top chrome"/"primary" UI). 31 // secondary UI (as opposed to just "top chrome"/"primary" UI).
32 static LabelButton* CreateSecondaryUiButton(ButtonListener* listener, 32 static LabelButton* CreateSecondaryUiButton(ButtonListener* listener,
33 const base::string16& text); 33 const base::string16& text);
34 static LabelButton* CreateSecondaryUiBlueButton(ButtonListener* listener,
35 const base::string16& text);
34 static MdTextButton* CreateMdButton(ButtonListener* listener, 36 static MdTextButton* CreateMdButton(ButtonListener* listener,
35 const base::string16& text); 37 const base::string16& text);
36 38
37 void SetCallToAction(CallToAction cta); 39 void SetCallToAction(CallToAction cta);
38 40
39 // LabelButton: 41 // LabelButton:
40 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 42 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
41 SkColor GetInkDropBaseColor() const override; 43 SkColor GetInkDropBaseColor() const override;
42 void SetText(const base::string16& text) override; 44 void SetText(const base::string16& text) override;
43 void UpdateStyleToIndicateDefaultStatus() override; 45 void UpdateStyleToIndicateDefaultStatus() override;
44 46
45 private: 47 private:
46 MdTextButton(ButtonListener* listener); 48 MdTextButton(ButtonListener* listener);
47 ~MdTextButton() override; 49 ~MdTextButton() override;
48 50
49 void UpdateColorsFromNativeTheme(); 51 void UpdateColorsFromNativeTheme();
50 52
51 ButtonInkDropDelegate ink_drop_delegate_; 53 ButtonInkDropDelegate ink_drop_delegate_;
52 54
53 // The call to action style for this button. 55 // The call to action style for this button.
54 CallToAction cta_; 56 CallToAction cta_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(MdTextButton); 58 DISALLOW_COPY_AND_ASSIGN(MdTextButton);
57 }; 59 };
58 60
59 } // namespace views 61 } // namespace views
60 62
61 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 63 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698