| 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 CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // in the screens coordinate system. | 120 // in the screens coordinate system. |
| 121 gfx::RectF GetBoundsInScreenSpace(const gfx::RectF& bounds); | 121 gfx::RectF GetBoundsInScreenSpace(const gfx::RectF& bounds); |
| 122 | 122 |
| 123 // Checks if the current page fulfils the conditions for the password manager | 123 // Checks if the current page fulfils the conditions for the password manager |
| 124 // to be active on it, for example Sync credentials are not saved or auto | 124 // to be active on it, for example Sync credentials are not saved or auto |
| 125 // filled. | 125 // filled. |
| 126 bool IsPasswordManagementEnabledForCurrentPage() const; | 126 bool IsPasswordManagementEnabledForCurrentPage() const; |
| 127 | 127 |
| 128 // Causes the password generation UI to be shown for the specified form. | 128 // Causes the password generation UI to be shown for the specified form. |
| 129 // The popup will be anchored at |element_bounds|. The generated password | 129 // The popup will be anchored at |element_bounds|. The generated password |
| 130 // will be no longer than |max_length|. | 130 // will be no longer than |max_length|. |generation_element| should contain a |
| 131 // name of a password field at which generation popup is attached. |
| 132 // |is_manually_triggered| informs whether it is automatically or manually |
| 133 // triggered generation. |
| 131 void ShowPasswordGenerationPopup(content::RenderFrameHost* render_frame_host, | 134 void ShowPasswordGenerationPopup(content::RenderFrameHost* render_frame_host, |
| 132 const gfx::RectF& bounds, | 135 const gfx::RectF& bounds, |
| 133 int max_length, | 136 int max_length, |
| 137 const base::string16& generation_element, |
| 138 bool is_manually_triggered, |
| 134 const autofill::PasswordForm& form); | 139 const autofill::PasswordForm& form); |
| 135 | 140 |
| 136 // Causes the password editing UI to be shown anchored at |element_bounds|. | 141 // Causes the password editing UI to be shown anchored at |element_bounds|. |
| 137 void ShowPasswordEditingPopup(content::RenderFrameHost* render_frame_host, | 142 void ShowPasswordEditingPopup(content::RenderFrameHost* render_frame_host, |
| 138 const gfx::RectF& bounds, | 143 const gfx::RectF& bounds, |
| 139 const autofill::PasswordForm& form); | 144 const autofill::PasswordForm& form); |
| 140 | 145 |
| 141 // Shows the dialog where the user can accept or decline the global autosignin | 146 // Shows the dialog where the user can accept or decline the global autosignin |
| 142 // setting as a first run experience. The dialog won't appear in Incognito or | 147 // setting as a first run experience. The dialog won't appear in Incognito or |
| 143 // when the autosign-in is off. | 148 // when the autosign-in is off. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 scoped_ptr<password_manager::LogManager> log_manager_; | 182 scoped_ptr<password_manager::LogManager> log_manager_; |
| 178 | 183 |
| 179 // Set during 'NotifyUserAutoSigninBlockedOnFirstRun' in order to store the | 184 // Set during 'NotifyUserAutoSigninBlockedOnFirstRun' in order to store the |
| 180 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. | 185 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. |
| 181 scoped_ptr<autofill::PasswordForm> form_blocked_on_first_run_; | 186 scoped_ptr<autofill::PasswordForm> form_blocked_on_first_run_; |
| 182 | 187 |
| 183 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 188 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
| 184 }; | 189 }; |
| 185 | 190 |
| 186 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 191 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| OLD | NEW |