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

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

Issue 13533021: Fix uninitialized POD member |use_custom_insets_| to fix regression and coverity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "ui/views/controls/button/text_button.h" 12 #include "ui/views/controls/button/text_button.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 // A border with zero left inset. 16 // A border with zero left inset.
17 class VIEWS_EXPORT CheckboxNativeThemeBorder 17 class VIEWS_EXPORT CheckboxNativeThemeBorder
18 : public TextButtonNativeThemeBorder { 18 : public TextButtonNativeThemeBorder {
19 public: 19 public:
20 explicit CheckboxNativeThemeBorder(views::NativeThemeDelegate* delegate) 20 explicit CheckboxNativeThemeBorder(views::NativeThemeDelegate* delegate)
21 : TextButtonNativeThemeBorder(delegate) {} 21 : TextButtonNativeThemeBorder(delegate),
22 use_custom_insets_(false) {}
22 virtual ~CheckboxNativeThemeBorder() {} 23 virtual ~CheckboxNativeThemeBorder() {}
23 24
24 // The insets apply to the whole view (checkbox + text), not just the square 25 // The insets apply to the whole view (checkbox + text), not just the square
25 // with the checkmark in it. The insets do not visibly affect the checkbox, 26 // with the checkmark in it. The insets do not visibly affect the checkbox,
26 // except to ensure that there is enough padding between this and other 27 // except to ensure that there is enough padding between this and other
27 // elements. 28 // elements.
28 virtual gfx::Insets GetInsets() const OVERRIDE; 29 virtual gfx::Insets GetInsets() const OVERRIDE;
29 30
30 // Use the |custom_insets_| provided instead of those from the theme. 31 // Use the |custom_insets_| provided instead of those from the theme.
31 void SetCustomInsets(const gfx::Insets& custom_insets); 32 void SetCustomInsets(const gfx::Insets& custom_insets);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 // True if the checkbox is checked. 82 // True if the checkbox is checked.
82 bool checked_; 83 bool checked_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(Checkbox); 85 DISALLOW_COPY_AND_ASSIGN(Checkbox);
85 }; 86 };
86 87
87 } // namespace views 88 } // namespace views
88 89
89 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ 90 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698