blob: 50c02c5d4317e9e19e19857bf24dca89569bf394 [file] [log] [blame]
[email protected]6246ac52012-09-24 01:55:291// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]3f1f8412011-01-19 03:01:232// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_CRYPTO_MODULE_PASSWORD_DIALOG_H_
6#define CHROME_BROWSER_UI_CRYPTO_MODULE_PASSWORD_DIALOG_H_
[email protected]3f1f8412011-01-19 03:01:237
8#include <string>
9
[email protected]289838c2011-09-29 22:12:2710#include "base/callback.h"
[email protected]3f1719b2013-11-14 00:34:5411#include "ui/gfx/native_widget_types.h"
[email protected]3f1f8412011-01-19 03:01:2312
[email protected]3f1f8412011-01-19 03:01:2313// An enum to describe the reason for the password request.
14enum CryptoModulePasswordReason {
[email protected]3f1f8412011-01-19 03:01:2315 kCryptoModulePasswordCertEnrollment,
16 kCryptoModulePasswordClientAuth,
[email protected]4c4f7cd2011-03-05 02:20:4417 kCryptoModulePasswordListCerts,
[email protected]3f1f8412011-01-19 03:01:2318 kCryptoModulePasswordCertImport,
19 kCryptoModulePasswordCertExport,
20};
21
[email protected]99e5e9522013-12-16 13:05:2722typedef base::Callback<void(const std::string&)> CryptoModulePasswordCallback;
[email protected]3f1f8412011-01-19 03:01:2323
24// Display a dialog, prompting the user to authenticate to unlock
25// |module|. |reason| describes the purpose of the authentication and
[email protected]791879c2013-12-17 07:22:4126// affects the message displayed in the dialog. |hostname| is the hostname
[email protected]3f1f8412011-01-19 03:01:2327// of the server which requested the access.
[email protected]6246ac52012-09-24 01:55:2928void ShowCryptoModulePasswordDialog(
29 const std::string& module_name,
30 bool retry,
31 CryptoModulePasswordReason reason,
[email protected]791879c2013-12-17 07:22:4132 const std::string& hostname,
[email protected]3f1719b2013-11-14 00:34:5433 gfx::NativeWindow parent,
[email protected]6246ac52012-09-24 01:55:2934 const CryptoModulePasswordCallback& callback);
[email protected]3f1f8412011-01-19 03:01:2335
[email protected]3f1f8412011-01-19 03:01:2336#endif // CHROME_BROWSER_UI_CRYPTO_MODULE_PASSWORD_DIALOG_H_