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

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

Issue 2680943002: ui: Clean up naming of paint-related identifiers (Closed)
Patch Set: Created 3 years, 10 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/color_chooser/color_chooser_view.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"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 gfx::ImageSkia GetImage(ButtonState for_state) const override; 53 gfx::ImageSkia GetImage(ButtonState for_state) const override;
54 54
55 // Set the image shown for each button state depending on whether it is 55 // Set the image shown for each button state depending on whether it is
56 // [checked] or [focused]. 56 // [checked] or [focused].
57 void SetCustomImage(bool checked, 57 void SetCustomImage(bool checked,
58 bool focused, 58 bool focused,
59 ButtonState for_state, 59 ButtonState for_state,
60 const gfx::ImageSkia& image); 60 const gfx::ImageSkia& image);
61 61
62 // Paints a focus indicator for the view. 62 // Paints a focus indicator for the view.
63 virtual void PaintFocusRing(gfx::Canvas* canvas, const cc::PaintFlags& paint); 63 virtual void PaintFocusRing(gfx::Canvas* canvas, const cc::PaintFlags& flags);
64 64
65 // Gets the vector icon to use based on the current state of |checked_|. 65 // Gets the vector icon to use based on the current state of |checked_|.
66 virtual const gfx::VectorIcon& GetVectorIcon() const; 66 virtual const gfx::VectorIcon& GetVectorIcon() const;
67 67
68 private: 68 private:
69 // Overridden from Button: 69 // Overridden from Button:
70 void NotifyClick(const ui::Event& event) override; 70 void NotifyClick(const ui::Event& event) override;
71 71
72 ui::NativeTheme::Part GetThemePart() const override; 72 ui::NativeTheme::Part GetThemePart() const override;
73 void GetExtraParams(ui::NativeTheme::ExtraParams* params) const override; 73 void GetExtraParams(ui::NativeTheme::ExtraParams* params) const override;
74 74
75 // True if the checkbox is checked. 75 // True if the checkbox is checked.
76 bool checked_; 76 bool checked_;
77 77
78 // The images for each button node_data. 78 // The images for each button node_data.
79 gfx::ImageSkia images_[2][2][STATE_COUNT]; 79 gfx::ImageSkia images_[2][2][STATE_COUNT];
80 80
81 DISALLOW_COPY_AND_ASSIGN(Checkbox); 81 DISALLOW_COPY_AND_ASSIGN(Checkbox);
82 }; 82 };
83 83
84 } // namespace views 84 } // namespace views
85 85
86 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ 86 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
OLDNEW
« no previous file with comments | « ui/views/color_chooser/color_chooser_view.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698