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

Unified Diff: ui/views/controls/button/checkbox.cc

Issue 10387121: Revert 136996 - ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/views/controls/button/checkbox.h ('k') | ui/views/controls/button/radio_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/checkbox.cc
===================================================================
--- ui/views/controls/button/checkbox.cc (revision 137002)
+++ ui/views/controls/button/checkbox.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,10 +36,11 @@
gfx::Size Checkbox::GetPreferredSize() {
gfx::Size prefsize(TextButtonBase::GetPreferredSize());
- ui::NativeTheme::ExtraParams extra;
- ui::NativeTheme::State state = GetThemeState(&extra);
- gfx::Size size = ui::NativeTheme::instance()->GetPartSize(GetThemePart(),
- state, extra);
+ gfx::NativeTheme::ExtraParams extra;
+ gfx::NativeTheme::State state = GetThemeState(&extra);
+ gfx::Size size = gfx::NativeTheme::instance()->GetPartSize(GetThemePart(),
+ state,
+ extra);
prefsize.Enlarge(size.width(), 0);
prefsize.set_height(std::max(prefsize.height(), size.height()));
@@ -75,15 +76,16 @@
TextButtonBase::NotifyClick(event);
}
-ui::NativeTheme::Part Checkbox::GetThemePart() const {
- return ui::NativeTheme::kCheckbox;
+gfx::NativeTheme::Part Checkbox::GetThemePart() const {
+ return gfx::NativeTheme::kCheckbox;
}
gfx::Rect Checkbox::GetThemePaintRect() const {
- ui::NativeTheme::ExtraParams extra;
- ui::NativeTheme::State state = GetThemeState(&extra);
- gfx::Size size(ui::NativeTheme::instance()->GetPartSize(GetThemePart(), state,
- extra));
+ gfx::NativeTheme::ExtraParams extra;
+ gfx::NativeTheme::State state = GetThemeState(&extra);
+ gfx::Size size(gfx::NativeTheme::instance()->GetPartSize(GetThemePart(),
+ state,
+ extra));
gfx::Insets insets = GetInsets();
int y_offset = (height() - size.height()) / 2;
gfx::Rect rect(insets.left(), y_offset, size.width(), size.height());
@@ -91,17 +93,18 @@
return rect;
}
-void Checkbox::GetExtraParams(ui::NativeTheme::ExtraParams* params) const {
+void Checkbox::GetExtraParams(gfx::NativeTheme::ExtraParams* params) const {
TextButtonBase::GetExtraParams(params);
params->button.checked = checked_;
}
gfx::Rect Checkbox::GetTextBounds() const {
gfx::Rect bounds(TextButtonBase::GetTextBounds());
- ui::NativeTheme::ExtraParams extra;
- ui::NativeTheme::State state = GetThemeState(&extra);
- gfx::Size size(ui::NativeTheme::instance()->GetPartSize(GetThemePart(), state,
- extra));
+ gfx::NativeTheme::ExtraParams extra;
+ gfx::NativeTheme::State state = GetThemeState(&extra);
+ gfx::Size size(gfx::NativeTheme::instance()->GetPartSize(GetThemePart(),
+ state,
+ extra));
bounds.Offset(size.width() + kCheckboxLabelSpacing, 0);
return bounds;
}
« no previous file with comments | « ui/views/controls/button/checkbox.h ('k') | ui/views/controls/button/radio_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698