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

Unified Diff: ui/views/controls/button/checkbox.h

Issue 2026833003: MD - update checkbox and radio buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/button/checkbox.h
diff --git a/ui/views/controls/button/checkbox.h b/ui/views/controls/button/checkbox.h
index 0b96f0b7ef5b26287229c862d0cfccc9cad85ff5..d2b92e04ca0c04a2b8f67c9455512cd3c780086d 100644
--- a/ui/views/controls/button/checkbox.h
+++ b/ui/views/controls/button/checkbox.h
@@ -12,6 +12,8 @@
#include "base/strings/string16.h"
#include "ui/views/controls/button/label_button.h"
+class SkPaint;
+
namespace views {
// A native themed class representing a checkbox. This class does not use
@@ -19,6 +21,8 @@ namespace views {
class VIEWS_EXPORT Checkbox : public LabelButton {
public:
static const char kViewClassName[];
+ // Returns whether MD is enabled; exists for the sake of brevity.
+ static bool UseMd();
sky 2016/06/01 03:28:23 Move to protected section as only subclasses shoul
Evan Stade 2016/06/01 21:01:11 Done.
explicit Checkbox(const base::string16& label);
~Checkbox() override;
@@ -36,9 +40,11 @@ class VIEWS_EXPORT Checkbox : public LabelButton {
void Layout() override;
const char* GetClassName() const override;
void GetAccessibleState(ui::AXViewState* state) override;
+ void OnPaint(gfx::Canvas* canvas) override;
void OnFocus() override;
void OnBlur() override;
- const gfx::ImageSkia& GetImage(ButtonState for_state) override;
+ void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
+ gfx::ImageSkia GetImage(ButtonState for_state) const override;
// Set the image shown for each button state depending on whether it is
// [checked] or [focused].
@@ -47,6 +53,9 @@ class VIEWS_EXPORT Checkbox : public LabelButton {
ButtonState for_state,
const gfx::ImageSkia& image);
+ // Paints a focus indicator for the view.
+ virtual void PaintFocusRing(gfx::Canvas* canvas, const SkPaint& paint);
+
private:
// Overridden from Button:
void NotifyClick(const ui::Event& event) override;

Powered by Google App Engine
This is Rietveld 408576698