summaryrefslogtreecommitdiffstats
path: root/views/controls/button
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 16:29:32 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 16:29:32 +0000
commit2e1c2685a12d6c38089b07c3f6359e036736cabf (patch)
treebb5e3a3a1f28ca19f23f19874a206004f2fe6cec /views/controls/button
parent355e36f7b919a9dd3cfc1244cf91a497e301ffcd (diff)
downloadchromium_src-2e1c2685a12d6c38089b07c3f6359e036736cabf.zip
chromium_src-2e1c2685a12d6c38089b07c3f6359e036736cabf.tar.gz
chromium_src-2e1c2685a12d6c38089b07c3f6359e036736cabf.tar.bz2
views: Change Checkbox API to string16.
BUG=68267 R=sky@chromium.org Review URL: http://codereview.chromium.org/8245006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r--views/controls/button/checkbox.cc5
-rw-r--r--views/controls/button/checkbox.h5
-rw-r--r--views/controls/button/radio_button.cc3
3 files changed, 7 insertions, 6 deletions
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index 252fdc8..6eb683d 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -5,6 +5,7 @@
#include "views/controls/button/checkbox.h"
#include "base/logging.h"
+#include "base/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/gfx/canvas.h"
#include "views/controls/label.h"
@@ -19,8 +20,8 @@ static const int kCheckboxLabelSpacing = 4;
////////////////////////////////////////////////////////////////////////////////
// Checkbox, public:
-Checkbox::Checkbox(const std::wstring& label)
- : TextButtonBase(NULL, label),
+Checkbox::Checkbox(const string16& label)
+ : TextButtonBase(NULL, UTF16ToWideHack(label)),
checked_(false) {
set_border(new TextButtonNativeThemeBorder(this));
set_focusable(true);
diff --git a/views/controls/button/checkbox.h b/views/controls/button/checkbox.h
index 2916c54..723f1ea 100644
--- a/views/controls/button/checkbox.h
+++ b/views/controls/button/checkbox.h
@@ -8,6 +8,8 @@
#include <string>
+#include "base/compiler_specific.h"
+#include "base/string16.h"
#include "views/controls/button/text_button.h"
namespace views {
@@ -16,10 +18,9 @@ namespace views {
// platform specific objects to replicate the native platforms looks and feel.
class VIEWS_EXPORT Checkbox : public TextButtonBase {
public:
- // The button's class name.
static const char kViewClassName[];
- explicit Checkbox(const std::wstring& label);
+ explicit Checkbox(const string16& label);
virtual ~Checkbox();
// Sets a listener for this checkbox. Checkboxes aren't required to have them
diff --git a/views/controls/button/radio_button.cc b/views/controls/button/radio_button.cc
index ebf16cd..170d010 100644
--- a/views/controls/button/radio_button.cc
+++ b/views/controls/button/radio_button.cc
@@ -5,7 +5,6 @@
#include "views/controls/button/radio_button.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "views/widget/widget.h"
@@ -15,7 +14,7 @@ namespace views {
const char RadioButton::kViewClassName[] = "views/RadioButton";
RadioButton::RadioButton(const string16& label, int group_id)
- : Checkbox(UTF16ToWideHack(label)) {
+ : Checkbox(label) {
SetGroup(group_id);
set_focusable(true);
}