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

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

Issue 7057055: Show progress bar as soon as update state changed to UPDATE_STATUS_UPDATE_AVAILABLE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed test again Created 9 years, 6 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
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 ee34cd69394f7519ad4578e1334f08719bc1eeed..541dee7ea7fc2d8670a824fa91e9b72b6471c5d3 100644
--- a/chrome/browser/chromeos/login/update_view.cc
+++ b/chrome/browser/chromeos/login/update_view.cc
@@ -58,11 +58,13 @@ namespace chromeos {
UpdateView::UpdateView(chromeos::ScreenObserver* observer)
: installing_updates_label_(NULL),
+ preparing_updates_label_(NULL),
reboot_label_(NULL),
manual_reboot_label_(NULL),
progress_bar_(NULL),
show_curtain_(true),
show_manual_reboot_label_(false),
+ show_preparing_updates_label_(false),
observer_(observer) {
}
@@ -76,8 +78,10 @@ void UpdateView::Init() {
set_background(views::Background::CreateBackgroundPainter(true, painter));
InitLabel(&installing_updates_label_);
+ InitLabel(&preparing_updates_label_);
InitLabel(&reboot_label_);
InitLabel(&manual_reboot_label_);
+ preparing_updates_label_->SetVisible(false);
manual_reboot_label_->SetVisible(false);
manual_reboot_label_->SetColor(kManualRebootLabelColor);
@@ -108,6 +112,8 @@ void UpdateView::UpdateLocalizedStrings() {
installing_updates_label_->SetText(UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_INSTALLING_UPDATE,
l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME))));
+ preparing_updates_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_UPDATE_AVAILABLE)));
reboot_label_->SetText(
UTF16ToWide(l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC)));
manual_reboot_label_->SetText(
@@ -129,6 +135,11 @@ void UpdateView::ShowManualRebootInfo() {
UpdateVisibility();
}
+void UpdateView::ShowPreparingUpdatesInfo(bool visible) {
+ show_preparing_updates_label_ = visible;
+ UpdateVisibility();
+}
+
void UpdateView::ShowCurtain(bool show_curtain) {
if (show_curtain_ != show_curtain) {
show_curtain_ = show_curtain;
@@ -155,6 +166,7 @@ void UpdateView::Layout() {
int vertical_center = GetInsets().top() + max_height / 2;
installing_updates_label_->SizeToFit(max_width);
+ preparing_updates_label_->SizeToFit(max_width);
reboot_label_->SizeToFit(max_width);
manual_reboot_label_->SizeToFit(max_width);
@@ -168,6 +180,8 @@ void UpdateView::Layout() {
progress_bar_->y() -
kInstallingUpdatesLabelYBottomFromProgressBar -
installing_updates_label_->height());
+ preparing_updates_label_->SetX(installing_updates_label_->x());
+ preparing_updates_label_->SetY(installing_updates_label_->y());
reboot_label_->SetX(right_margin);
reboot_label_->SetY(
progress_bar_->y() +
@@ -209,8 +223,12 @@ void UpdateView::InitLabel(views::Label** label) {
}
void UpdateView::UpdateVisibility() {
- installing_updates_label_->SetVisible(
- !show_curtain_&& !show_manual_reboot_label_);
+ installing_updates_label_->SetVisible(!show_curtain_ &&
+ !show_manual_reboot_label_ &&
+ !show_preparing_updates_label_);
+ preparing_updates_label_->SetVisible(!show_curtain_ &&
+ !show_manual_reboot_label_ &&
+ show_preparing_updates_label_);
reboot_label_->SetVisible(!show_curtain_&& !show_manual_reboot_label_);
manual_reboot_label_->SetVisible(!show_curtain_ && show_manual_reboot_label_);
progress_bar_->SetVisible(!show_curtain_);
« no previous file with comments | « chrome/browser/chromeos/login/update_view.h ('k') | chrome/browser/chromeos/login/views_update_screen_actor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698