| Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. | ||||
| 4 | |||||
| [email protected] | 4f24296 | 2011-05-13 22:25:22 | [diff] [blame] | 5 | #ifndef CHROME_BROWSER_CERTIFICATE_VIEWER_H_ |
| 6 | #define CHROME_BROWSER_CERTIFICATE_VIEWER_H_ | ||||
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 7 | |
| Mitsuru Oshima | 195405d | 2025-09-17 03:21:46 | [diff] [blame] | 8 | #include "ui/gfx/native_ui_types.h" |
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 9 | |
| [email protected] | 4eb4ec0 | 2012-06-19 15:54:21 | [diff] [blame] | 10 | namespace content { |
| 11 | class WebContents; | ||||
| 12 | } | ||||
| 13 | |||||
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 14 | namespace net { |
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 15 | class X509Certificate; |
| [email protected] | 60d0f74ac | 2013-10-19 18:23:41 | [diff] [blame] | 16 | } |
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 17 | // Opens a certificate viewer under |parent| to display |cert|. |
| [email protected] | 4eb4ec0 | 2012-06-19 15:54:21 | [diff] [blame] | 18 | void ShowCertificateViewer(content::WebContents* web_contents, |
| 19 | gfx::NativeWindow parent, | ||||
| [email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 20 | net::X509Certificate* cert); |
| 21 | |||||
| Matt Mueller | 659822e2e | 2022-06-23 00:35:31 | [diff] [blame] | 22 | // Opens a certificate viewer for client authentication under |parent| to |
| 23 | // display |cert|. | ||||
| Alison Gale | 079e6e95 | 2024-04-16 22:00:30 | [diff] [blame] | 24 | // TODO(crbug.com/40847472): remove this and use the internal cert |
| Matt Mueller | 659822e2e | 2022-06-23 00:35:31 | [diff] [blame] | 25 | // viewer for client auth as well. |
| 26 | void ShowCertificateViewerForClientAuth(content::WebContents* web_contents, | ||||
| 27 | gfx::NativeWindow parent, | ||||
| 28 | net::X509Certificate* cert); | ||||
| 29 | |||||
| Gabriel Charette | fe05104 | 2022-01-19 09:27:29 | [diff] [blame] | 30 | // Go through the motions but do not invoke the native API showing a modal |
| 31 | // interactive dialog on platforms where that results in hanging tests. | ||||
| 32 | void MockCertificateViewerForTesting(); | ||||
| 33 | |||||
| [email protected] | 4f24296 | 2011-05-13 22:25:22 | [diff] [blame] | 34 | #endif // CHROME_BROWSER_CERTIFICATE_VIEWER_H_ |