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

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

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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/controls/button/button.h ('k') | ui/views/controls/button/custom_button.h » ('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 14 matching lines...) Expand all
25 // Sets a listener for this checkbox. Checkboxes aren't required to have them 25 // Sets a listener for this checkbox. Checkboxes aren't required to have them
26 // since their state can be read independently of them being toggled. 26 // since their state can be read independently of them being toggled.
27 void set_listener(ButtonListener* listener) { listener_ = listener; } 27 void set_listener(ButtonListener* listener) { listener_ = listener; }
28 28
29 // Sets/Gets whether or not the checkbox is checked. 29 // Sets/Gets whether or not the checkbox is checked.
30 virtual void SetChecked(bool checked); 30 virtual void SetChecked(bool checked);
31 bool checked() const { return checked_; } 31 bool checked() const { return checked_; }
32 32
33 protected: 33 protected:
34 // Overridden from LabelButton: 34 // Overridden from LabelButton:
35 virtual void Layout() OVERRIDE; 35 virtual void Layout() override;
36 virtual const char* GetClassName() const OVERRIDE; 36 virtual const char* GetClassName() const override;
37 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 37 virtual void GetAccessibleState(ui::AXViewState* state) override;
38 virtual void OnFocus() OVERRIDE; 38 virtual void OnFocus() override;
39 virtual void OnBlur() OVERRIDE; 39 virtual void OnBlur() override;
40 virtual const gfx::ImageSkia& GetImage(ButtonState for_state) OVERRIDE; 40 virtual const gfx::ImageSkia& GetImage(ButtonState for_state) override;
41 41
42 // Set the image shown for each button state depending on whether it is 42 // Set the image shown for each button state depending on whether it is
43 // [checked] or [focused]. 43 // [checked] or [focused].
44 void SetCustomImage(bool checked, 44 void SetCustomImage(bool checked,
45 bool focused, 45 bool focused,
46 ButtonState for_state, 46 ButtonState for_state,
47 const gfx::ImageSkia& image); 47 const gfx::ImageSkia& image);
48 48
49 private: 49 private:
50 // Overridden from Button: 50 // Overridden from Button:
51 virtual void NotifyClick(const ui::Event& event) OVERRIDE; 51 virtual void NotifyClick(const ui::Event& event) override;
52 52
53 virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE; 53 virtual ui::NativeTheme::Part GetThemePart() const override;
54 virtual void GetExtraParams( 54 virtual void GetExtraParams(
55 ui::NativeTheme::ExtraParams* params) const OVERRIDE; 55 ui::NativeTheme::ExtraParams* params) const override;
56 56
57 // True if the checkbox is checked. 57 // True if the checkbox is checked.
58 bool checked_; 58 bool checked_;
59 59
60 // The images for each button state. 60 // The images for each button state.
61 gfx::ImageSkia images_[2][2][STATE_COUNT]; 61 gfx::ImageSkia images_[2][2][STATE_COUNT];
62 62
63 DISALLOW_COPY_AND_ASSIGN(Checkbox); 63 DISALLOW_COPY_AND_ASSIGN(Checkbox);
64 }; 64 };
65 65
66 } // namespace views 66 } // namespace views
67 67
68 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ 68 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/button.h ('k') | ui/views/controls/button/custom_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698