| 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/options2/certificate_manager_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_util.h" // for FileAccessProvider | 9 #include "base/file_util.h" // for FileAccessProvider |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 break; | 486 break; |
| 487 default: | 487 default: |
| 488 NOTREACHED(); | 488 NOTREACHED(); |
| 489 } | 489 } |
| 490 } | 490 } |
| 491 | 491 |
| 492 void CertificateManagerHandler::View(const ListValue* args) { | 492 void CertificateManagerHandler::View(const ListValue* args) { |
| 493 net::X509Certificate* cert = CallbackArgsToCert(args); | 493 net::X509Certificate* cert = CallbackArgsToCert(args); |
| 494 if (!cert) | 494 if (!cert) |
| 495 return; | 495 return; |
| 496 ShowCertificateViewer(GetParentWindow(), cert); | 496 ShowCertificateViewer(web_ui()->GetWebContents(), GetParentWindow(), cert); |
| 497 } | 497 } |
| 498 | 498 |
| 499 void CertificateManagerHandler::GetCATrust(const ListValue* args) { | 499 void CertificateManagerHandler::GetCATrust(const ListValue* args) { |
| 500 net::X509Certificate* cert = CallbackArgsToCert(args); | 500 net::X509Certificate* cert = CallbackArgsToCert(args); |
| 501 if (!cert) { | 501 if (!cert) { |
| 502 web_ui()->CallJavascriptFunction("CertificateEditCaTrustOverlay.dismiss"); | 502 web_ui()->CallJavascriptFunction("CertificateEditCaTrustOverlay.dismiss"); |
| 503 return; | 503 return; |
| 504 } | 504 } |
| 505 | 505 |
| 506 net::CertDatabase::TrustBits trust_bits = | 506 net::CertDatabase::TrustBits trust_bits = |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", | 1061 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", |
| 1062 ready); | 1062 ready); |
| 1063 } | 1063 } |
| 1064 #endif | 1064 #endif |
| 1065 | 1065 |
| 1066 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1066 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
| 1067 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); | 1067 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 } // namespace options2 | 1070 } // namespace options2 |
| OLD | NEW |