| 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/certificate_viewer_webui.h" | 5 #include "chrome/browser/ui/webui/certificate_viewer_webui.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 gfx::NativeWindow CertificateViewerDialog::GetNativeWebContentsModalDialog() { | 235 gfx::NativeWindow CertificateViewerDialog::GetNativeWebContentsModalDialog() { |
| 236 return dialog_->GetNativeDialog(); | 236 return dialog_->GetNativeDialog(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 GURL CertificateViewerDialog::GetDialogContentURL() const { | 239 GURL CertificateViewerDialog::GetDialogContentURL() const { |
| 240 return GURL(chrome::kChromeUICertificateViewerURL); | 240 return GURL(chrome::kChromeUICertificateViewerURL); |
| 241 } | 241 } |
| 242 | 242 |
| 243 ui::ModalType CertificateViewerDialog::GetDialogModalType() const { | 243 ui::ModalType CertificateViewerDialog::GetDialogModalType() const { |
| 244 return ui::MODAL_TYPE_NONE; | 244 return ui::MODAL_TYPE_CHILD; |
| 245 } | 245 } |
| 246 | 246 |
| 247 //////////////////////////////////////////////////////////////////////////////// | 247 //////////////////////////////////////////////////////////////////////////////// |
| 248 // CertificateViewerDialogHandler | 248 // CertificateViewerDialogHandler |
| 249 | 249 |
| 250 CertificateViewerDialogHandler::CertificateViewerDialogHandler( | 250 CertificateViewerDialogHandler::CertificateViewerDialogHandler( |
| 251 CertificateViewerModalDialog* dialog, | 251 CertificateViewerModalDialog* dialog, |
| 252 net::X509Certificate* cert) | 252 net::X509Certificate* cert) |
| 253 : cert_(cert), dialog_(dialog) { | 253 : cert_(cert), dialog_(dialog) { |
| 254 cert_chain_.push_back(cert_->os_cert_handle()); | 254 cert_chain_.push_back(cert_->os_cert_handle()); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 const base::ListValue* args) const { | 460 const base::ListValue* args) const { |
| 461 int cert_index; | 461 int cert_index; |
| 462 double val; | 462 double val; |
| 463 if (!(args->GetDouble(0, &val))) | 463 if (!(args->GetDouble(0, &val))) |
| 464 return -1; | 464 return -1; |
| 465 cert_index = static_cast<int>(val); | 465 cert_index = static_cast<int>(val); |
| 466 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size())) | 466 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size())) |
| 467 return -1; | 467 return -1; |
| 468 return cert_index; | 468 return cert_index; |
| 469 } | 469 } |
| OLD | NEW |