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

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

Issue 6976048: views: Add OnEnabledChanged() method to View class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698