OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "grit/chromium_strings.h" | 9 #include "grit/chromium_strings.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void UpdateScreenHandler::PrepareToShow() { | 56 void UpdateScreenHandler::PrepareToShow() { |
57 } | 57 } |
58 | 58 |
59 void UpdateScreenHandler::ShowManualRebootInfo() { | 59 void UpdateScreenHandler::ShowManualRebootInfo() { |
60 StringValue message(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED)); | 60 StringValue message(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED)); |
61 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateMessage", message); | 61 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateMessage", message); |
62 } | 62 } |
63 | 63 |
64 void UpdateScreenHandler::SetProgress(int progress) { | 64 void UpdateScreenHandler::SetProgress(int progress) { |
65 FundamentalValue progress_value(progress); | 65 base::FundamentalValue progress_value(progress); |
66 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateProgress", | 66 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateProgress", |
67 progress_value); | 67 progress_value); |
68 } | 68 } |
69 | 69 |
70 void UpdateScreenHandler::ShowCurtain(bool enable) { | 70 void UpdateScreenHandler::ShowCurtain(bool enable) { |
71 FundamentalValue enable_value(enable); | 71 base::FundamentalValue enable_value(enable); |
72 web_ui_->CallJavascriptFunction("cr.ui.Oobe.showUpdateCurtain", enable_value); | 72 web_ui_->CallJavascriptFunction("cr.ui.Oobe.showUpdateCurtain", enable_value); |
73 } | 73 } |
74 | 74 |
75 void UpdateScreenHandler::ShowPreparingUpdatesInfo(bool visible) { | 75 void UpdateScreenHandler::ShowPreparingUpdatesInfo(bool visible) { |
76 scoped_ptr<StringValue> info_message; | 76 scoped_ptr<StringValue> info_message; |
77 if (visible) { | 77 if (visible) { |
78 info_message.reset(Value::CreateStringValue( | 78 info_message.reset(Value::CreateStringValue( |
79 l10n_util::GetStringUTF16(IDS_UPDATE_AVAILABLE))); | 79 l10n_util::GetStringUTF16(IDS_UPDATE_AVAILABLE))); |
80 } else { | 80 } else { |
81 info_message.reset(Value::CreateStringValue( | 81 info_message.reset(Value::CreateStringValue( |
82 l10n_util::GetStringFUTF16(IDS_INSTALLING_UPDATE, | 82 l10n_util::GetStringFUTF16(IDS_INSTALLING_UPDATE, |
83 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)))); | 83 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)))); |
84 } | 84 } |
85 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateMessage", | 85 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateMessage", |
86 *info_message); | 86 *info_message); |
87 } | 87 } |
88 | 88 |
89 void UpdateScreenHandler::RegisterMessages() { | 89 void UpdateScreenHandler::RegisterMessages() { |
90 } | 90 } |
91 | 91 |
92 } // namespace chromeos | 92 } // namespace chromeos |
OLD | NEW |