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

Side by Side Diff: views/controls/button/text_button.cc

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « views/controls/button/native_button_win.cc ('k') | views/controls/combobox/combobox.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/controls/button/text_button.h" 5 #include "views/controls/button/text_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 SetText(text); 204 SetText(text);
205 set_border(new TextButtonBorder); 205 set_border(new TextButtonBorder);
206 SetAnimationDuration(kHoverAnimationDurationMs); 206 SetAnimationDuration(kHoverAnimationDurationMs);
207 } 207 }
208 208
209 TextButton::~TextButton() { 209 TextButton::~TextButton() {
210 } 210 }
211 211
212 void TextButton::SetText(const std::wstring& text) { 212 void TextButton::SetText(const std::wstring& text) {
213 text_ = WideToUTF16Hack(text); 213 text_ = WideToUTF16Hack(text);
214 SetAccessibleName(text); 214 SetAccessibleName(WideToUTF16Hack(text));
215 UpdateTextSize(); 215 UpdateTextSize();
216 } 216 }
217 217
218 void TextButton::SetIcon(const SkBitmap& icon) { 218 void TextButton::SetIcon(const SkBitmap& icon) {
219 icon_ = icon; 219 icon_ = icon;
220 } 220 }
221 221
222 void TextButton::SetHoverIcon(const SkBitmap& icon) { 222 void TextButton::SetHoverIcon(const SkBitmap& icon) {
223 icon_hover_ = icon; 223 icon_hover_ = icon;
224 has_hover_icon_ = true; 224 has_hover_icon_ = true;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 455
456 std::string TextButton::GetClassName() const { 456 std::string TextButton::GetClassName() const {
457 return kViewClassName; 457 return kViewClassName;
458 } 458 }
459 459
460 void TextButton::Paint(gfx::Canvas* canvas) { 460 void TextButton::Paint(gfx::Canvas* canvas) {
461 Paint(canvas, false); 461 Paint(canvas, false);
462 } 462 }
463 463
464 } // namespace views 464 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/button/native_button_win.cc ('k') | views/controls/combobox/combobox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698