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

Unified Diff: chrome/browser/chromeos/login/update_view.cc

Issue 7646004: chromeos: Improve brightness and volume animations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hopefully fix windows compile and DCHECK Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/setting_level_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/update_view.cc
diff --git a/chrome/browser/chromeos/login/update_view.cc b/chrome/browser/chromeos/login/update_view.cc
index 6e192cfa0fad73c2a6e5809e43d46865f149e92d..3755e42d0e109bbdc7151fe1443b4bef25b04571 100644
--- a/chrome/browser/chromeos/login/update_view.cc
+++ b/chrome/browser/chromeos/login/update_view.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/login/update_view.h"
+#include <algorithm>
#include <string>
#include "base/logging.h"
@@ -22,6 +23,7 @@
#include "views/focus/focus_manager.h"
#include "views/widget/widget.h"
+using std::max;
using views::Background;
using views::Label;
using views::View;
@@ -88,6 +90,7 @@ void UpdateView::Init() {
progress_bar_ = new views::ProgressBar();
AddChildView(progress_bar_);
+ progress_bar_->SetDisplayRange(0.0, 100.0);
// Curtain view.
InitLabel(&checking_label_);
@@ -106,7 +109,7 @@ void UpdateView::Init() {
}
void UpdateView::Reset() {
- progress_bar_->SetProgress(0);
+ progress_bar_->SetValue(0.0);
}
void UpdateView::UpdateLocalizedStrings() {
@@ -124,11 +127,12 @@ void UpdateView::UpdateLocalizedStrings() {
}
void UpdateView::AddProgress(int ticks) {
- progress_bar_->AddProgress(ticks);
+ progress_bar_->SetValue(
+ max(progress_bar_->current_value() + ticks, 100.0));
}
void UpdateView::SetProgress(int progress) {
- progress_bar_->SetProgress(progress);
+ progress_bar_->SetValue(progress);
}
void UpdateView::ShowManualRebootInfo() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/setting_level_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698