OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/options/certificate_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 389 |
390 // Badges next to certificates | 390 // Badges next to certificates |
391 localized_strings->SetString("badgeCertUntrusted", | 391 localized_strings->SetString("badgeCertUntrusted", |
392 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_UNTRUSTED)); | 392 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_UNTRUSTED)); |
393 localized_strings->SetString("certPolicyInstalled", | 393 localized_strings->SetString("certPolicyInstalled", |
394 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_POLICY_INSTALLED)); | 394 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_POLICY_INSTALLED)); |
395 | 395 |
396 #if defined(OS_CHROMEOS) | 396 #if defined(OS_CHROMEOS) |
397 localized_strings->SetString("importAndBindCertificate", | 397 localized_strings->SetString("importAndBindCertificate", |
398 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_IMPORT_AND_BIND_BUTTON)); | 398 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_IMPORT_AND_BIND_BUTTON)); |
399 localized_strings->SetString("hardwareBackedKeyFormat", | |
400 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_HARDWARE_BACKED_KEY_FORMAT)); | |
401 localized_strings->SetString("chromeOSDeviceName", | |
402 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_HARDWARE_BACKED)); | |
403 #endif // defined(OS_CHROMEOS) | 399 #endif // defined(OS_CHROMEOS) |
404 } | 400 } |
405 | 401 |
406 void CertificateManagerHandler::RegisterMessages() { | 402 void CertificateManagerHandler::RegisterMessages() { |
407 web_ui()->RegisterMessageCallback( | 403 web_ui()->RegisterMessageCallback( |
408 "viewCertificate", | 404 "viewCertificate", |
409 base::Bind(&CertificateManagerHandler::View, base::Unretained(this))); | 405 base::Bind(&CertificateManagerHandler::View, base::Unretained(this))); |
410 | 406 |
411 web_ui()->RegisterMessageCallback( | 407 web_ui()->RegisterMessageCallback( |
412 "getCaCertificateTrust", | 408 "getCaCertificateTrust", |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", | 1117 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", |
1122 ready); | 1118 ready); |
1123 } | 1119 } |
1124 #endif | 1120 #endif |
1125 | 1121 |
1126 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1122 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1127 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); | 1123 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); |
1128 } | 1124 } |
1129 | 1125 |
1130 } // namespace options | 1126 } // namespace options |
OLD | NEW |