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

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

Issue 6995072: Merge 88317 - Show progress bar as soon as update state changed to UPDATE_STATUS_UPDATE_AVAILABLE (Closed) Base URL: svn://svn.chromium.org/chrome/branches/782/src/
Patch Set: 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
===================================================================
--- chrome/browser/chromeos/login/update_view.cc (revision 88318)
+++ chrome/browser/chromeos/login/update_view.cc (working copy)
@@ -58,11 +58,13 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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::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