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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); | 66 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); |
67 | 67 |
68 // Causes the password generation UI to be shown for the specified form. | 68 // Causes the password generation UI to be shown for the specified form. |
69 // The popup will be anchored at |element_bounds|. The generated password | 69 // The popup will be anchored at |element_bounds|. The generated password |
70 // will be no longer than |max_length|. | 70 // will be no longer than |max_length|. |
71 void OnShowPasswordGenerationPopup(const gfx::RectF& element_bounds, | 71 void OnShowPasswordGenerationPopup(const gfx::RectF& element_bounds, |
72 int max_length, | 72 int max_length, |
73 const autofill::PasswordForm& form); | 73 const autofill::PasswordForm& form); |
74 | 74 |
75 // Causes the password editing UI to be shown anchored at |element_bounds|. | 75 // Causes the password editing UI to be shown anchored at |element_bounds|. |
76 void OnShowPasswordEditingPopup(const gfx::RectF& element_bounds); | 76 void OnShowPasswordEditingPopup(const gfx::RectF& element_bounds, |
| 77 const autofill::PasswordForm& form); |
77 | 78 |
78 // Hides any visible UI. | 79 // Hides any visible UI. |
79 void OnHidePasswordGenerationPopup(); | 80 void OnHidePasswordGenerationPopup(); |
80 | 81 |
81 private: | 82 private: |
82 friend class PasswordGenerationManagerTest; | 83 friend class PasswordGenerationManagerTest; |
83 | 84 |
84 // Determines current state of password generation | 85 // Determines current state of password generation |
85 bool IsGenerationEnabled() const; | 86 bool IsGenerationEnabled() const; |
86 | 87 |
(...skipping 28 matching lines...) Expand all Loading... |
115 PasswordManagerClient* client_; | 116 PasswordManagerClient* client_; |
116 | 117 |
117 // The PasswordManagerDriver instance associated with this instance. Must | 118 // The PasswordManagerDriver instance associated with this instance. Must |
118 // outlive this instance. | 119 // outlive this instance. |
119 PasswordManagerDriver* driver_; | 120 PasswordManagerDriver* driver_; |
120 | 121 |
121 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); | 122 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); |
122 }; | 123 }; |
123 | 124 |
124 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ | 125 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ |
OLD | NEW |