| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 virtual void SetChecked(bool checked); | 40 virtual void SetChecked(bool checked); |
| 41 bool checked() const { return checked_; } | 41 bool checked() const { return checked_; } |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 // Returns whether MD is enabled; exists for the sake of brevity. | 44 // Returns whether MD is enabled; exists for the sake of brevity. |
| 45 static bool UseMd(); | 45 static bool UseMd(); |
| 46 | 46 |
| 47 // Overridden from LabelButton: | 47 // Overridden from LabelButton: |
| 48 void Layout() override; | 48 void Layout() override; |
| 49 const char* GetClassName() const override; | 49 const char* GetClassName() const override; |
| 50 void GetAccessibleState(ui::AXViewState* state) override; | 50 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 51 void OnPaint(gfx::Canvas* canvas) override; | 51 void OnPaint(gfx::Canvas* canvas) override; |
| 52 void OnFocus() override; | 52 void OnFocus() override; |
| 53 void OnBlur() override; | 53 void OnBlur() override; |
| 54 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 54 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 55 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; | 55 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; |
| 56 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; | 56 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; |
| 57 SkColor GetInkDropBaseColor() const override; | 57 SkColor GetInkDropBaseColor() const override; |
| 58 gfx::ImageSkia GetImage(ButtonState for_state) const override; | 58 gfx::ImageSkia GetImage(ButtonState for_state) const override; |
| 59 | 59 |
| 60 // Set the image shown for each button state depending on whether it is | 60 // Set the image shown for each button state depending on whether it is |
| (...skipping 13 matching lines...) Expand all Loading... |
| 74 private: | 74 private: |
| 75 // Overridden from Button: | 75 // Overridden from Button: |
| 76 void NotifyClick(const ui::Event& event) override; | 76 void NotifyClick(const ui::Event& event) override; |
| 77 | 77 |
| 78 ui::NativeTheme::Part GetThemePart() const override; | 78 ui::NativeTheme::Part GetThemePart() const override; |
| 79 void GetExtraParams(ui::NativeTheme::ExtraParams* params) const override; | 79 void GetExtraParams(ui::NativeTheme::ExtraParams* params) const override; |
| 80 | 80 |
| 81 // True if the checkbox is checked. | 81 // True if the checkbox is checked. |
| 82 bool checked_; | 82 bool checked_; |
| 83 | 83 |
| 84 // The images for each button state. | 84 // The images for each button node_data. |
| 85 gfx::ImageSkia images_[2][2][STATE_COUNT]; | 85 gfx::ImageSkia images_[2][2][STATE_COUNT]; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(Checkbox); | 87 DISALLOW_COPY_AND_ASSIGN(Checkbox); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace views | 90 } // namespace views |
| 91 | 91 |
| 92 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 92 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
| OLD | NEW |