summaryrefslogtreecommitdiffstats
path: root/views/examples
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 13:32:23 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 13:32:23 +0000
commitc8d71d105c95cd631ebc0d159e31ffc71774d25b (patch)
tree98c587eba7e799c6b530914f4730e58271d5b896 /views/examples
parentcb16e5e394534e72b01fe16986e9dad19ecd0516 (diff)
downloadchromium_src-c8d71d105c95cd631ebc0d159e31ffc71774d25b.zip
chromium_src-c8d71d105c95cd631ebc0d159e31ffc71774d25b.tar.gz
chromium_src-c8d71d105c95cd631ebc0d159e31ffc71774d25b.tar.bz2
views: Change RadioButton API to string16.
BUG=68267 R=sky@chromium.org Review URL: http://codereview.chromium.org/8229017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/examples')
-rw-r--r--views/examples/radio_button_example.cc4
-rw-r--r--views/examples/scroll_view_example.cc3
2 files changed, 5 insertions, 2 deletions
diff --git a/views/examples/radio_button_example.cc b/views/examples/radio_button_example.cc
index 41bdfb1..ae5aa0e 100644
--- a/views/examples/radio_button_example.cc
+++ b/views/examples/radio_button_example.cc
@@ -5,6 +5,7 @@
#include "views/examples/radio_button_example.h"
#include "base/stringprintf.h"
+#include "base/utf_string_conversions.h"
#include "views/controls/button/text_button.h"
#include "views/layout/grid_layout.h"
#include "views/view.h"
@@ -25,7 +26,8 @@ void RadioButtonExample::CreateExampleView(views::View* container) {
int group = 1;
for (size_t i = 0; i < arraysize(radio_buttons_); ++i) {
radio_buttons_[i] = new views::RadioButton(
- base::StringPrintf( L"Radio %d in group %d", i + 1, group), group);
+ UTF8ToUTF16(base::StringPrintf("Radio %d in group %d", i + 1, group)),
+ group);
radio_buttons_[i]->set_listener(this);
}
diff --git a/views/examples/scroll_view_example.cc b/views/examples/scroll_view_example.cc
index da66359..be7aced 100644
--- a/views/examples/scroll_view_example.cc
+++ b/views/examples/scroll_view_example.cc
@@ -5,6 +5,7 @@
#include "views/examples/scroll_view_example.h"
#include "base/stringprintf.h"
+#include "base/utf_string_conversions.h"
#include "views/controls/button/radio_button.h"
#include "views/layout/grid_layout.h"
#include "views/view.h"
@@ -18,7 +19,7 @@ class ScrollViewExample::ScrollableView : public views::View {
ScrollableView() {
SetColor(SK_ColorRED, SK_ColorCYAN);
AddChildView(new views::TextButton(NULL, L"Button"));
- AddChildView(new views::RadioButton(L"Radio Button", 0));
+ AddChildView(new views::RadioButton(ASCIIToUTF16("Radio Button"), 0));
}
virtual gfx::Size GetPreferredSize() {