Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / components / password_manager / content / browser / content_password_manager_driver.h
blob52d7a763bc665ba328162740988b7e310b91cb78
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 COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRIVER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRIVER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/password_manager/core/browser/password_autofill_manager.h"
11 #include "components/password_manager/core/browser/password_generation_manager.h"
12 #include "components/password_manager/core/browser/password_manager.h"
13 #include "components/password_manager/core/browser/password_manager_driver.h"
14 #include "content/public/browser/web_contents_observer.h"
16 namespace autofill {
17 class AutofillManager;
18 struct PasswordForm;
21 namespace content {
22 class WebContents;
25 namespace password_manager {
27 class ContentPasswordManagerDriver : public PasswordManagerDriver,
28 public content::WebContentsObserver {
29 public:
30 ContentPasswordManagerDriver(content::WebContents* web_contents,
31 PasswordManagerClient* client,
32 autofill::AutofillClient* autofill_client);
33 virtual ~ContentPasswordManagerDriver();
35 // PasswordManagerDriver implementation.
36 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data)
37 OVERRIDE;
38 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE;
39 virtual bool IsOffTheRecord() OVERRIDE;
40 virtual void AllowPasswordGenerationForForm(
41 const autofill::PasswordForm& form) OVERRIDE;
42 virtual void AccountCreationFormsFound(
43 const std::vector<autofill::FormData>& forms) OVERRIDE;
44 virtual void FillSuggestion(const base::string16& username,
45 const base::string16& password) OVERRIDE;
46 virtual void PreviewSuggestion(const base::string16& username,
47 const base::string16& password) OVERRIDE;
48 virtual void ClearPreviewedForm() OVERRIDE;
50 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE;
51 virtual PasswordManager* GetPasswordManager() OVERRIDE;
52 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE;
53 virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE;
55 // content::WebContentsObserver overrides.
56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
57 virtual void DidNavigateMainFrame(
58 const content::LoadCommittedDetails& details,
59 const content::FrameNavigateParams& params) OVERRIDE;
61 private:
62 PasswordManager password_manager_;
63 PasswordGenerationManager password_generation_manager_;
64 PasswordAutofillManager password_autofill_manager_;
66 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver);
69 } // namespace password_manager
71 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRIVER_H_