| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "components/password_manager/core/browser/password_autofill_manager.h" | 10 #include "components/password_manager/core/browser/password_autofill_manager.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 const std::vector<autofill::FormData>& forms) override; | 52 const std::vector<autofill::FormData>& forms) override; |
| 53 void AutofillDataReceived( | 53 void AutofillDataReceived( |
| 54 const std::map<autofill::FormData, autofill::FormFieldData>& predictions) | 54 const std::map<autofill::FormData, autofill::FormFieldData>& predictions) |
| 55 override; | 55 override; |
| 56 void GeneratedPasswordAccepted(const base::string16& password) override; | 56 void GeneratedPasswordAccepted(const base::string16& password) override; |
| 57 void FillSuggestion(const base::string16& username, | 57 void FillSuggestion(const base::string16& username, |
| 58 const base::string16& password) override; | 58 const base::string16& password) override; |
| 59 void PreviewSuggestion(const base::string16& username, | 59 void PreviewSuggestion(const base::string16& username, |
| 60 const base::string16& password) override; | 60 const base::string16& password) override; |
| 61 void ClearPreviewedForm() override; | 61 void ClearPreviewedForm() override; |
| 62 void ForceSavePassword() override; |
| 62 | 63 |
| 63 PasswordGenerationManager* GetPasswordGenerationManager() override; | 64 PasswordGenerationManager* GetPasswordGenerationManager() override; |
| 64 PasswordManager* GetPasswordManager() override; | 65 PasswordManager* GetPasswordManager() override; |
| 65 PasswordAutofillManager* GetPasswordAutofillManager() override; | 66 PasswordAutofillManager* GetPasswordAutofillManager() override; |
| 66 | 67 |
| 67 bool HandleMessage(const IPC::Message& message); | 68 bool HandleMessage(const IPC::Message& message); |
| 68 void DidNavigateFrame(const content::LoadCommittedDetails& details, | 69 void DidNavigateFrame(const content::LoadCommittedDetails& details, |
| 69 const content::FrameNavigateParams& params); | 70 const content::FrameNavigateParams& params); |
| 70 | 71 |
| 71 // Pass-throughs to PasswordManager. | 72 // Pass-throughs to PasswordManager. |
| 72 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); | 73 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); |
| 73 void OnPasswordFormsRendered( | 74 void OnPasswordFormsRendered( |
| 74 const std::vector<autofill::PasswordForm>& visible_forms, | 75 const std::vector<autofill::PasswordForm>& visible_forms, |
| 75 bool did_stop_loading); | 76 bool did_stop_loading); |
| 76 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); | 77 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); |
| 77 void OnInPageNavigation(const autofill::PasswordForm& password_form); | 78 void OnInPageNavigation(const autofill::PasswordForm& password_form); |
| 78 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); | 79 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); |
| 80 void OnPasswordFormForceSaveRequested( |
| 81 const autofill::PasswordForm& password_form); |
| 79 | 82 |
| 80 private: | 83 private: |
| 81 content::RenderFrameHost* render_frame_host_; | 84 content::RenderFrameHost* render_frame_host_; |
| 82 PasswordManagerClient* client_; | 85 PasswordManagerClient* client_; |
| 83 PasswordGenerationManager password_generation_manager_; | 86 PasswordGenerationManager password_generation_manager_; |
| 84 PasswordAutofillManager password_autofill_manager_; | 87 PasswordAutofillManager password_autofill_manager_; |
| 85 | 88 |
| 86 // Every instance of PasswordFormFillData created by |*this| and sent to | 89 // Every instance of PasswordFormFillData created by |*this| and sent to |
| 87 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that | 90 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that |
| 88 // the latter two classes can reference to the same instance without sending | 91 // the latter two classes can reference to the same instance without sending |
| 89 // it to each other over IPC. The counter below is used to generate new IDs. | 92 // it to each other over IPC. The counter below is used to generate new IDs. |
| 90 int next_free_key_; | 93 int next_free_key_; |
| 91 | 94 |
| 92 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); | 95 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 } // namespace password_manager | 98 } // namespace password_manager |
| 96 | 99 |
| 97 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ | 100 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ |
| OLD | NEW |