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

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

Issue 15419002: views: Store only the name of the class in kViewClassName constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/controls/button/custom_button.cc » ('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 #include "ui/views/controls/button/checkbox.h" 5 #include "ui/views/controls/button/checkbox.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/accessibility/accessible_view_state.h" 8 #include "ui/base/accessibility/accessible_view_state.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/controls/label.h" 10 #include "ui/views/controls/label.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 namespace { 14 namespace {
15 15
16 const int kCheckboxLabelSpacing = 4; 16 const int kCheckboxLabelSpacing = 4;
17 17
18 const int kFocusBorderWidth = 1; 18 const int kFocusBorderWidth = 1;
19 19
20 } // namespace 20 } // namespace
21 21
22 // static 22 // static
23 const char Checkbox::kViewClassName[] = "views/Checkbox"; 23 const char Checkbox::kViewClassName[] = "Checkbox";
24 24
25 //////////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////////
26 // CheckboxNativeThemeBorder, public: 26 // CheckboxNativeThemeBorder, public:
27 27
28 gfx::Insets CheckboxNativeThemeBorder::GetInsets() const { 28 gfx::Insets CheckboxNativeThemeBorder::GetInsets() const {
29 if (use_custom_insets_) 29 if (use_custom_insets_)
30 return custom_insets_; 30 return custom_insets_;
31 31
32 const gfx::Insets& insets = TextButtonNativeThemeBorder::GetInsets(); 32 const gfx::Insets& insets = TextButtonNativeThemeBorder::GetInsets();
33 return gfx::Insets(insets.top(), 0, insets.bottom(), 0); 33 return gfx::Insets(insets.top(), 0, insets.bottom(), 0);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 gfx::Rect Checkbox::GetTextBounds() const { 127 gfx::Rect Checkbox::GetTextBounds() const {
128 gfx::Rect bounds(TextButtonBase::GetTextBounds()); 128 gfx::Rect bounds(TextButtonBase::GetTextBounds());
129 ui::NativeTheme::ExtraParams extra; 129 ui::NativeTheme::ExtraParams extra;
130 ui::NativeTheme::State state = GetThemeState(&extra); 130 ui::NativeTheme::State state = GetThemeState(&extra);
131 gfx::Size size(GetNativeTheme()->GetPartSize(GetThemePart(), state, extra)); 131 gfx::Size size(GetNativeTheme()->GetPartSize(GetThemePart(), state, extra));
132 bounds.Offset(size.width() + kCheckboxLabelSpacing, 0); 132 bounds.Offset(size.width() + kCheckboxLabelSpacing, 0);
133 return bounds; 133 return bounds;
134 } 134 }
135 135
136 } // namespace views 136 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698