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

Unified Diff: chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc

Issue 10389064: Added estimated time remaining on AU. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Issues are fixed, sync. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/update_screen_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
index bf48bf10d9f12136a5ff2c12259181ec09fd98d5..9eb7564caed24f0d8d95a9b379cee77f8b702767 100644
--- a/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -40,6 +40,14 @@ void UpdateScreenHandler::GetLocalizedStrings(
l10n_util::GetStringUTF16(IDS_CHECKING_FOR_UPDATES));
localized_strings->SetString("installingUpdateDesc",
l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC));
+ localized_strings->SetString("downloadingTimeLeftLong",
+ l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_LONG));
+ localized_strings->SetString("downloadingTimeLeftStatusOneHour",
+ l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_STATUS_ONE_HOUR));
+ localized_strings->SetString("downloadingTimeLeftStatusMinutes",
+ l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_STATUS_MINUTES));
+ localized_strings->SetString("downloadingTimeLeftSmall",
+ l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_SMALL));
#if !defined(OFFICIAL_BUILD)
localized_strings->SetString("cancelUpdateHint",
l10n_util::GetStringUTF16(IDS_UPDATE_CANCEL));
@@ -87,6 +95,18 @@ void UpdateScreenHandler::SetProgress(int progress) {
progress_value);
}
+void UpdateScreenHandler::ShowEstimatedTimeLeft(bool enable) {
+ base::FundamentalValue enable_value(enable);
+ web_ui()->CallJavascriptFunction(
+ "cr.ui.Oobe.showUpdateEstimatedTimeLeft", enable_value);
+}
+
+void UpdateScreenHandler::SetEstimatedTimeLeft(const base::TimeDelta& time) {
+ base::FundamentalValue seconds_value(time.InSecondsF());
+ web_ui()->CallJavascriptFunction(
+ "cr.ui.Oobe.setUpdateEstimatedTimeLeft", seconds_value);
+}
+
void UpdateScreenHandler::ShowCurtain(bool enable) {
base::FundamentalValue enable_value(enable);
web_ui()->CallJavascriptFunction(
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/update_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698