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

Side by Side Diff: views/controls/image_view.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/combobox/combobox.cc ('k') | views/controls/label.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) 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/image_view.h" 5 #include "views/controls/image_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "gfx/canvas.h" 9 #include "gfx/canvas.h"
10 #include "gfx/insets.h" 10 #include "gfx/insets.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 SchedulePaint(); 147 SchedulePaint();
148 } 148 }
149 } 149 }
150 150
151 ImageView::Alignment ImageView::GetVerticalAlignment() { 151 ImageView::Alignment ImageView::GetVerticalAlignment() {
152 return vert_alignment_; 152 return vert_alignment_;
153 } 153 }
154 154
155 void ImageView::SetTooltipText(const std::wstring& tooltip) { 155 void ImageView::SetTooltipText(const std::wstring& tooltip) {
156 tooltip_text_ = WideToUTF16Hack(tooltip); 156 tooltip_text_ = WideToUTF16Hack(tooltip);
157 SetAccessibleName(tooltip); 157 SetAccessibleName(WideToUTF16Hack(tooltip));
158 } 158 }
159 159
160 std::wstring ImageView::GetTooltipText() { 160 std::wstring ImageView::GetTooltipText() {
161 return UTF16ToWideHack(tooltip_text_); 161 return UTF16ToWideHack(tooltip_text_);
162 } 162 }
163 163
164 bool ImageView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) { 164 bool ImageView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
165 if (tooltip_text_.empty()) 165 if (tooltip_text_.empty())
166 return false; 166 return false;
167 167
168 *tooltip = GetTooltipText(); 168 *tooltip = GetTooltipText();
169 return true; 169 return true;
170 } 170 }
171 171
172 } // namespace views 172 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/combobox/combobox.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698