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

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: sky review 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
« no previous file with comments | « ui/gfx/vector_icons/radio_button_normal.icon ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..919c141587ef855221917e0323d4a0f6ae01d5b5 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
@@ -32,13 +34,18 @@ class VIEWS_EXPORT Checkbox : public LabelButton {
bool checked() const { return checked_; }
protected:
+ // Returns whether MD is enabled; exists for the sake of brevity.
+ static bool UseMd();
+
// Overridden from 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 +54,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;
« no previous file with comments | « ui/gfx/vector_icons/radio_button_normal.icon ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698