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

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

Issue 2960393002: Hardcode ripple color/opacity for Harmony. (Closed)
Patch Set: Consolidate FloodFill as well Created 3 years, 5 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 | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/md_text_button.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_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 24 matching lines...) Expand all
35 void SetBgColorOverride(const base::Optional<SkColor>& color); 35 void SetBgColorOverride(const base::Optional<SkColor>& color);
36 36
37 // View: 37 // View:
38 void OnPaintBackground(gfx::Canvas* canvas) override; 38 void OnPaintBackground(gfx::Canvas* canvas) override;
39 39
40 // LabelButton: 40 // LabelButton:
41 void OnFocus() override; 41 void OnFocus() override;
42 void OnBlur() override; 42 void OnBlur() override;
43 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 43 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
44 std::unique_ptr<InkDrop> CreateInkDrop() override; 44 std::unique_ptr<InkDrop> CreateInkDrop() override;
45 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; 45 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override;
46 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() 46 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override;
47 const override;
48 SkColor GetInkDropBaseColor() const override; 47 SkColor GetInkDropBaseColor() const override;
49 void SetEnabledTextColors(SkColor color) override; 48 void SetEnabledTextColors(SkColor color) override;
50 void SetText(const base::string16& text) override; 49 void SetText(const base::string16& text) override;
51 void UpdateStyleToIndicateDefaultStatus() override; 50 void UpdateStyleToIndicateDefaultStatus() override;
52 void StateChanged(ButtonState old_state) override; 51 void StateChanged(ButtonState old_state) override;
53 52
54 private: 53 private:
55 MdTextButton(ButtonListener* listener, int button_context); 54 MdTextButton(ButtonListener* listener, int button_context);
56 55
57 void UpdatePadding(); 56 void UpdatePadding();
58 void UpdateColors(); 57 void UpdateColors();
59 58
60 // True if this button uses prominent styling (blue fill, etc.). 59 // True if this button uses prominent styling (blue fill, etc.).
61 bool is_prominent_; 60 bool is_prominent_;
62 61
63 // When set, this provides the background color. 62 // When set, this provides the background color.
64 base::Optional<SkColor> bg_color_override_; 63 base::Optional<SkColor> bg_color_override_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(MdTextButton); 65 DISALLOW_COPY_AND_ASSIGN(MdTextButton);
67 }; 66 };
68 67
69 } // namespace views 68 } // namespace views
70 69
71 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ 70 #endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button.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