diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 19:34:49 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 19:34:49 +0000 |
commit | 1f18184a07252103a8cd9652d64de749f41ef09f (patch) | |
tree | 7e0c5eb9dea2890d8231eb7ad69dec318ac6e610 /chrome/browser/ssl_client_certificate_selector.h | |
parent | 348b9bc12d4e2ccd03a7fbcb327a3975207a5fec (diff) | |
download | chromium_src-1f18184a07252103a8cd9652d64de749f41ef09f.zip chromium_src-1f18184a07252103a8cd9652d64de749f41ef09f.tar.gz chromium_src-1f18184a07252103a8cd9652d64de749f41ef09f.tar.bz2 |
Refactor SSLClientAuthHandler and certificate selection
This cleans up much of the code involved in displaying a certificate selection
dialog to the user.
- Adds a new inner class to RenderViewHostDelegate (later to be populated
with more SSL things).
- Adds a helper class for TabContents' implementation.
- Moves the certificate dialogs themselves to have a common entry point.
- Makes SSLClientAuthHandler call the RVHDelegate to query the user, with the
TabContents implementation displaying the dialogs.
- Picks the correct parent window for the dialog on all platforms, instead of
relying on BrowserList::GetLastActive
- Makes the OS X implementation use an asynchronous sheet, now that we know the
parent.
- Fixes an index-mismatch problem in the OS X implementation, should we fail to create an identity.
R=agl,brettw,mark
BUG=148
TEST=selecting client certificates still works
Review URL: http://codereview.chromium.org/2823038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_client_certificate_selector.h')
-rw-r--r-- | chrome/browser/ssl_client_certificate_selector.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/browser/ssl_client_certificate_selector.h b/chrome/browser/ssl_client_certificate_selector.h new file mode 100644 index 0000000..8a12a70 --- /dev/null +++ b/chrome/browser/ssl_client_certificate_selector.h @@ -0,0 +1,30 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ +#define CHROME_BROWSER_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ + +#include "gfx/native_widget_types.h" + +class SSLClientAuthHandler; + +namespace net { +class SSLCertRequestInfo; +} + +namespace browser { + +// Opens an SSL client certificate selection dialog under |parent|, offering +// certificates from |cert_request_info|. When the user has made a selection, +// the dialog will report back to |delegate|. |delegate| is notified when the +// dialog closes in call cases; if the user cancels the dialog, we call with a +// NULL certificate. +void ShowSSLClientCertificateSelector( + gfx::NativeWindow parent, + net::SSLCertRequestInfo* cert_request_info, + SSLClientAuthHandler* delegate); + +} // namespace browser + +#endif // CHROME_BROWSER_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ |