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( |