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

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

Issue 2447523002: [ash-md] Added different highlighting modes to the InkDropImpl. (Closed)
Patch Set: Fixed InkDropHostView::GetInkDrop() to use CreateInkDrop(). Created 4 years, 1 month 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/animation/test/test_ink_drop_host.cc ('k') | ui/views/controls/button/checkbox.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHECKBOX_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "ui/views/controls/button/label_button.h" 13 #include "ui/views/controls/button/label_button.h"
14 14
15 class SkPaint; 15 class SkPaint;
16 16
17 namespace gfx { 17 namespace gfx {
18 enum class VectorIconId; 18 enum class VectorIconId;
19 } 19 }
20 20
21 namespace views { 21 namespace views {
22 22
23 class InkDropHover;
24 class InkDropRipple;
25
26 // A native themed class representing a checkbox. This class does not use 23 // A native themed class representing a checkbox. This class does not use
27 // platform specific objects to replicate the native platforms looks and feel. 24 // platform specific objects to replicate the native platforms looks and feel.
28 class VIEWS_EXPORT Checkbox : public LabelButton { 25 class VIEWS_EXPORT Checkbox : public LabelButton {
29 public: 26 public:
30 static const char kViewClassName[]; 27 static const char kViewClassName[];
31 28
32 explicit Checkbox(const base::string16& label); 29 explicit Checkbox(const base::string16& label);
33 ~Checkbox() override; 30 ~Checkbox() override;
34 31
35 // Sets a listener for this checkbox. Checkboxes aren't required to have them 32 // Sets a listener for this checkbox. Checkboxes aren't required to have them
(...skipping 10 matching lines...) Expand all
46 43
47 // Overridden from LabelButton: 44 // Overridden from LabelButton:
48 void Layout() override; 45 void Layout() override;
49 const char* GetClassName() const override; 46 const char* GetClassName() const override;
50 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 47 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
51 void OnPaint(gfx::Canvas* canvas) override; 48 void OnPaint(gfx::Canvas* canvas) override;
52 void OnFocus() override; 49 void OnFocus() override;
53 void OnBlur() override; 50 void OnBlur() override;
54 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 51 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
55 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; 52 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override;
56 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override;
57 SkColor GetInkDropBaseColor() const override; 53 SkColor GetInkDropBaseColor() const override;
58 gfx::ImageSkia GetImage(ButtonState for_state) const override; 54 gfx::ImageSkia GetImage(ButtonState for_state) const override;
59 55
60 // Set the image shown for each button state depending on whether it is 56 // Set the image shown for each button state depending on whether it is
61 // [checked] or [focused]. 57 // [checked] or [focused].
62 void SetCustomImage(bool checked, 58 void SetCustomImage(bool checked,
63 bool focused, 59 bool focused,
64 ButtonState for_state, 60 ButtonState for_state,
65 const gfx::ImageSkia& image); 61 const gfx::ImageSkia& image);
66 62
(...skipping 16 matching lines...) Expand all
83 79
84 // The images for each button node_data. 80 // The images for each button node_data.
85 gfx::ImageSkia images_[2][2][STATE_COUNT]; 81 gfx::ImageSkia images_[2][2][STATE_COUNT];
86 82
87 DISALLOW_COPY_AND_ASSIGN(Checkbox); 83 DISALLOW_COPY_AND_ASSIGN(Checkbox);
88 }; 84 };
89 85
90 } // namespace views 86 } // namespace views
91 87
92 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ 88 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
OLDNEW
« no previous file with comments | « ui/views/animation/test/test_ink_drop_host.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698