OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/progress_bar.h" | 5 #include "views/controls/progress_bar.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 } | 297 } |
298 | 298 |
299 bool ProgressBar::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) { | 299 bool ProgressBar::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) { |
300 DCHECK(tooltip); | 300 DCHECK(tooltip); |
301 if (tooltip == NULL) | 301 if (tooltip == NULL) |
302 return false; | 302 return false; |
303 tooltip->assign(UTF16ToWideHack(tooltip_text_)); | 303 tooltip->assign(UTF16ToWideHack(tooltip_text_)); |
304 return !tooltip_text_.empty(); | 304 return !tooltip_text_.empty(); |
305 } | 305 } |
306 | 306 |
307 void ProgressBar::SetEnabled(bool enabled) { | 307 void ProgressBar::OnEnabledChanged(bool enabled) { |
308 if (enabled == enabled_) | 308 if (enabled == enabled_) |
309 return; | 309 return; |
310 View::SetEnabled(enabled); | 310 View::SetEnabled(enabled); |
Ben Goodger (Google)
2011/05/27 16:01:21
Infinite recursion.
tfarina
2011/05/27 16:25:04
Done.
| |
311 // TODO(denisromanov): Need to switch progress bar color here? | 311 // TODO(denisromanov): Need to switch progress bar color here? |
312 } | 312 } |
313 | 313 |
314 void ProgressBar::GetAccessibleState(ui::AccessibleViewState* state) { | 314 void ProgressBar::GetAccessibleState(ui::AccessibleViewState* state) { |
315 state->role = ui::AccessibilityTypes::ROLE_PROGRESSBAR; | 315 state->role = ui::AccessibilityTypes::ROLE_PROGRESSBAR; |
316 state->state = ui::AccessibilityTypes::STATE_READONLY; | 316 state->state = ui::AccessibilityTypes::STATE_READONLY; |
317 } | 317 } |
318 | 318 |
319 } // namespace views | 319 } // namespace views |
OLD | NEW |