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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 void CertificateViewerDialog::Show(WebContents* web_contents, | 70 void CertificateViewerDialog::Show(WebContents* web_contents, |
71 gfx::NativeWindow parent) { | 71 gfx::NativeWindow parent) { |
72 // TODO(bshe): UI tweaks needed for Aura HTML Dialog, such as adding padding | 72 // TODO(bshe): UI tweaks needed for Aura HTML Dialog, such as adding padding |
73 // on the title for Aura ConstrainedWebDialogUI. | 73 // on the title for Aura ConstrainedWebDialogUI. |
74 window_ = CreateConstrainedWebDialog( | 74 window_ = CreateConstrainedWebDialog( |
75 web_contents->GetBrowserContext(), | 75 web_contents->GetBrowserContext(), |
76 this, | 76 this, |
77 NULL, | 77 NULL, |
78 web_contents)->GetWindow()->GetNativeWindow(); | 78 web_contents)->GetWindow()->GetNativeDialog(); |
79 } | 79 } |
80 | 80 |
81 ui::ModalType CertificateViewerDialog::GetDialogModalType() const { | 81 ui::ModalType CertificateViewerDialog::GetDialogModalType() const { |
82 return ui::MODAL_TYPE_NONE; | 82 return ui::MODAL_TYPE_NONE; |
83 } | 83 } |
84 | 84 |
85 string16 CertificateViewerDialog::GetDialogTitle() const { | 85 string16 CertificateViewerDialog::GetDialogTitle() const { |
86 return title_; | 86 return title_; |
87 } | 87 } |
88 | 88 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 const base::ListValue* args) const { | 403 const base::ListValue* args) const { |
404 int cert_index; | 404 int cert_index; |
405 double val; | 405 double val; |
406 if (!(args->GetDouble(0, &val))) | 406 if (!(args->GetDouble(0, &val))) |
407 return -1; | 407 return -1; |
408 cert_index = static_cast<int>(val); | 408 cert_index = static_cast<int>(val); |
409 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size())) | 409 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size())) |
410 return -1; | 410 return -1; |
411 return cert_index; | 411 return cert_index; |
412 } | 412 } |
OLD | NEW |