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

Side by Side Diff: ui/views/controls/progress_bar.cc

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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 | « ui/views/controls/progress_bar.h ('k') | ui/views/controls/progress_bar_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/progress_bar.h" 5 #include "ui/views/controls/progress_bar.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 } 161 }
162 162
163 void ProgressBar::SetValue(double value) { 163 void ProgressBar::SetValue(double value) {
164 if (value != current_value_) { 164 if (value != current_value_) {
165 current_value_ = value; 165 current_value_ = value;
166 SchedulePaint(); 166 SchedulePaint();
167 } 167 }
168 } 168 }
169 169
170 void ProgressBar::SetTooltipText(const string16& tooltip_text) { 170 void ProgressBar::SetTooltipText(const base::string16& tooltip_text) {
171 tooltip_text_ = tooltip_text; 171 tooltip_text_ = tooltip_text;
172 } 172 }
173 173
174 bool ProgressBar::GetTooltipText(const gfx::Point& p, string16* tooltip) const { 174 bool ProgressBar::GetTooltipText(const gfx::Point& p,
175 base::string16* tooltip) const {
175 DCHECK(tooltip); 176 DCHECK(tooltip);
176 *tooltip = tooltip_text_; 177 *tooltip = tooltip_text_;
177 return !tooltip_text_.empty(); 178 return !tooltip_text_.empty();
178 } 179 }
179 180
180 void ProgressBar::GetAccessibleState(ui::AccessibleViewState* state) { 181 void ProgressBar::GetAccessibleState(ui::AccessibleViewState* state) {
181 state->role = ui::AccessibilityTypes::ROLE_PROGRESSBAR; 182 state->role = ui::AccessibilityTypes::ROLE_PROGRESSBAR;
182 state->state = ui::AccessibilityTypes::STATE_READONLY; 183 state->state = ui::AccessibilityTypes::STATE_READONLY;
183 } 184 }
184 185
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Draw bar stroke 314 // Draw bar stroke
314 StrokeRoundRect(canvas, 315 StrokeRoundRect(canvas,
315 bar_left, bar_top, progress_width, bar_height, 316 bar_left, bar_top, progress_width, bar_height,
316 kCornerRadius, 317 kCornerRadius,
317 enabled() ? kBarBorderColor : kDisabledBarBorderColor, 318 enabled() ? kBarBorderColor : kDisabledBarBorderColor,
318 kBorderWidth); 319 kBorderWidth);
319 } 320 }
320 } 321 }
321 322
322 } // namespace views 323 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/progress_bar.h ('k') | ui/views/controls/progress_bar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698