| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "components/autofill/core/browser/autofill_client.h" | 12 #include "components/autofill/core/browser/autofill_client.h" |
| 13 #include "components/autofill/core/browser/autofill_popup_delegate.h" | 13 #include "components/autofill/core/browser/autofill_popup_delegate.h" |
| 14 #include "components/autofill/core/common/password_form_fill_data.h" | 14 #include "components/autofill/core/common/password_form_fill_data.h" |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class RectF; | 17 class RectF; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace password_manager { | 20 namespace password_manager { |
| 21 | 21 |
| 22 class PasswordManagerClient; | 22 class PasswordManagerClient; |
| 23 class PasswordManagerDriver; |
| 23 | 24 |
| 24 // This class is responsible for filling password forms. | 25 // This class is responsible for filling password forms. |
| 25 class PasswordAutofillManager : public autofill::AutofillPopupDelegate { | 26 class PasswordAutofillManager : public autofill::AutofillPopupDelegate { |
| 26 public: | 27 public: |
| 27 PasswordAutofillManager(PasswordManagerClient* password_manager_client, | 28 PasswordAutofillManager(PasswordManagerClient* password_manager_client, |
| 29 PasswordManagerDriver* password_manager_driver, |
| 28 autofill::AutofillClient* autofill_client); | 30 autofill::AutofillClient* autofill_client); |
| 29 virtual ~PasswordAutofillManager(); | 31 virtual ~PasswordAutofillManager(); |
| 30 | 32 |
| 31 // AutofillPopupDelegate implementation. | 33 // AutofillPopupDelegate implementation. |
| 32 void OnPopupShown() override; | 34 void OnPopupShown() override; |
| 33 void OnPopupHidden() override; | 35 void OnPopupHidden() override; |
| 34 void DidSelectSuggestion(const base::string16& value, | 36 void DidSelectSuggestion(const base::string16& value, |
| 35 int identifier) override; | 37 int identifier) override; |
| 36 void DidAcceptSuggestion(const base::string16& value, | 38 void DidAcceptSuggestion(const base::string16& value, |
| 37 int identifier) override; | 39 int identifier) override; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // The logins we have filled so far with their associated info. | 87 // The logins we have filled so far with their associated info. |
| 86 LoginToPasswordInfoMap login_to_password_info_; | 88 LoginToPasswordInfoMap login_to_password_info_; |
| 87 | 89 |
| 88 // When the autofill popup should be shown, |form_data_key_| identifies the | 90 // When the autofill popup should be shown, |form_data_key_| identifies the |
| 89 // right password info in |login_to_password_info_|. | 91 // right password info in |login_to_password_info_|. |
| 90 int form_data_key_; | 92 int form_data_key_; |
| 91 | 93 |
| 92 // Provides embedder-level operations on passwords. Must outlive |this|. | 94 // Provides embedder-level operations on passwords. Must outlive |this|. |
| 93 PasswordManagerClient* const password_manager_client_; // weak | 95 PasswordManagerClient* const password_manager_client_; // weak |
| 94 | 96 |
| 97 // The driver that owns |this|. |
| 98 PasswordManagerDriver* password_manager_driver_; |
| 99 |
| 95 autofill::AutofillClient* const autofill_client_; // weak | 100 autofill::AutofillClient* const autofill_client_; // weak |
| 96 | 101 |
| 97 base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_; | 102 base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_; |
| 98 | 103 |
| 99 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); | 104 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); |
| 100 }; | 105 }; |
| 101 | 106 |
| 102 } // namespace password_manager | 107 } // namespace password_manager |
| 103 | 108 |
| 104 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ | 109 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ |
| OLD | NEW |