1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DRIVER_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DRIVER_H_
8 class PasswordGenerationManager
;
12 class AutofillManager
;
14 struct PasswordFormFillData
;
15 } // namespace autofill
17 // Interface that allows PasswordManager core code to interact with its driver
18 // (i.e., obtain information from it and give information to it).
19 class PasswordManagerDriver
{
21 PasswordManagerDriver() {}
22 virtual ~PasswordManagerDriver() {}
24 // Fills forms matching |form_data|.
25 virtual void FillPasswordForm(
26 const autofill::PasswordFormFillData
& form_data
) = 0;
28 // Returns whether any SSL certificate errors were encountered as a result of
29 // the last page load.
30 virtual bool DidLastPageLoadEncounterSSLErrors() = 0;
32 // If this browsing session should not be persisted.
33 virtual bool IsOffTheRecord() = 0;
35 // Returns the PasswordGenerationManager associated with this instance.
36 virtual PasswordGenerationManager
* GetPasswordGenerationManager() = 0;
38 // Returns the PasswordManager associated with this instance.
39 virtual PasswordManager
* GetPasswordManager() = 0;
41 // Returns the AutofillManager associated with this instance.
42 virtual autofill::AutofillManager
* GetAutofillManager() = 0;
44 // Informs the driver that |form| can be used for password generation.
45 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm
* form
) = 0;
48 DISALLOW_COPY_AND_ASSIGN(PasswordManagerDriver
);
51 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DRIVER_H_