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

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

Issue 2311423002: Harmony - update button focus rings. (Closed)
Patch Set: Created 4 years, 3 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"
(...skipping 14 matching lines...) Expand all
25 const base::string16& text); 25 const base::string16& text);
26 // As above, but only creates an MdTextButton if MD is enabled in the 26 // As above, but only creates an MdTextButton if MD is enabled in the
27 // secondary UI (as opposed to just "top chrome"/"primary" UI). 27 // secondary UI (as opposed to just "top chrome"/"primary" UI).
28 static LabelButton* CreateSecondaryUiButton(ButtonListener* listener, 28 static LabelButton* CreateSecondaryUiButton(ButtonListener* listener,
29 const base::string16& text); 29 const base::string16& text);
30 static LabelButton* CreateSecondaryUiBlueButton(ButtonListener* listener, 30 static LabelButton* CreateSecondaryUiBlueButton(ButtonListener* listener,
31 const base::string16& text); 31 const base::string16& text);
32 static MdTextButton* CreateMdButton(ButtonListener* listener, 32 static MdTextButton* CreateMdButton(ButtonListener* listener,
33 const base::string16& text); 33 const base::string16& text);
34 34
35 // Paint an MD-style focus ring on the given canvas at the given bounds.
36 static void PaintMdFocusRing(gfx::Canvas* canvas,
37 View* view,
38 int thickness,
39 SkAlpha alpha);
40
41 // See |is_cta_|. 35 // See |is_cta_|.
42 void SetCallToAction(bool cta); 36 void SetCallToAction(bool cta);
43 void set_bg_color_override(SkColor color) { bg_color_override_ = color; } 37 void set_bg_color_override(SkColor color) { bg_color_override_ = color; }
44 38
45 // LabelButton: 39 // LabelButton:
46 void Layout() override; 40 void Layout() override;
47 void OnFocus() override; 41 void OnFocus() override;
48 void OnBlur() override; 42 void OnBlur() override;
49 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 43 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
50 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; 44 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
(...skipping 28 matching lines...) Expand all
79 73
80 // When set, this provides the background color. 74 // When set, this provides the background color.
81 base::Optional<SkColor> bg_color_override_; 75 base::Optional<SkColor> bg_color_override_;
82 76
83 DISALLOW_COPY_AND_ASSIGN(MdTextButton); 77 DISALLOW_COPY_AND_ASSIGN(MdTextButton);
84 }; 78 };
85 79
86 } // namespace views 80 } // namespace views
87 81
88 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 82 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view_md.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