| 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/eula_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 10 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 localized_strings->SetString("eulaTpmBusy", | 76 localized_strings->SetString("eulaTpmBusy", |
| 77 l10n_util::GetStringUTF16(IDS_EULA_TPM_BUSY)); | 77 l10n_util::GetStringUTF16(IDS_EULA_TPM_BUSY)); |
| 78 localized_strings->SetString("eulaTpmOkButton", | 78 localized_strings->SetString("eulaTpmOkButton", |
| 79 l10n_util::GetStringUTF16(IDS_OK)); | 79 l10n_util::GetStringUTF16(IDS_OK)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void EulaScreenHandler::Initialize() { | 82 void EulaScreenHandler::Initialize() { |
| 83 if (!page_is_ready() || !delegate_) | 83 if (!page_is_ready() || !delegate_) |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 FundamentalValue checked(delegate_->IsUsageStatsEnabled()); | 86 base::FundamentalValue checked(delegate_->IsUsageStatsEnabled()); |
| 87 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUsageStats", checked); | 87 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUsageStats", checked); |
| 88 | 88 |
| 89 // This OEM EULA is a file:// URL which we're unable to load in iframe. | 89 // This OEM EULA is a file:// URL which we're unable to load in iframe. |
| 90 // Instead if it's defined we use chrome://terms/oem that will load same file. | 90 // Instead if it's defined we use chrome://terms/oem that will load same file. |
| 91 if (!delegate_->GetOemEulaUrl().is_empty()) { | 91 if (!delegate_->GetOemEulaUrl().is_empty()) { |
| 92 StringValue oem_eula_url(chrome::kChromeUITermsOemURL); | 92 StringValue oem_eula_url(chrome::kChromeUITermsOemURL); |
| 93 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setOemEulaUrl", oem_eula_url); | 93 web_ui_->CallJavascriptFunction("cr.ui.Oobe.setOemEulaUrl", oem_eula_url); |
| 94 } | 94 } |
| 95 | 95 |
| 96 if (show_on_init_) { | 96 if (show_on_init_) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 help_app_->ShowHelpTopic(HelpAppLauncher::HELP_STATS_USAGE); | 139 help_app_->ShowHelpTopic(HelpAppLauncher::HELP_STATS_USAGE); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void EulaScreenHandler::HandleOnTpmPopupOpened(const base::ListValue* args) { | 142 void EulaScreenHandler::HandleOnTpmPopupOpened(const base::ListValue* args) { |
| 143 if (!delegate_) | 143 if (!delegate_) |
| 144 return; | 144 return; |
| 145 delegate_->InitiatePasswordFetch(); | 145 delegate_->InitiatePasswordFetch(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace chromeos | 148 } // namespace chromeos |
| OLD | NEW |