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_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/timer/elapsed_timer.h" | 9 #include "base/timer/elapsed_timer.h" |
10 #include "chrome/browser/ui/passwords/manage_passwords_state.h" | 10 #include "chrome/browser/ui/passwords/manage_passwords_state.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // Shows the password bubble without user interaction. | 189 // Shows the password bubble without user interaction. |
190 void ShowBubbleWithoutUserInteraction(); | 190 void ShowBubbleWithoutUserInteraction(); |
191 | 191 |
192 // content::WebContentsObserver: | 192 // content::WebContentsObserver: |
193 void WebContentsDestroyed() override; | 193 void WebContentsDestroyed() override; |
194 | 194 |
195 // Shows infobar which allows user to choose credentials. Placing this | 195 // Shows infobar which allows user to choose credentials. Placing this |
196 // code to separate method allows mocking. | 196 // code to separate method allows mocking. |
197 virtual void UpdateAndroidAccountChooserInfoBarVisibility(); | 197 virtual void UpdateAndroidAccountChooserInfoBarVisibility(); |
198 | 198 |
| 199 // Shows the snackbar, which informs the users that they were automatically |
| 200 // signed in to the web site. The snackbar is triggered by the Credential |
| 201 // Manager API. Placing this code to separate method allows mocking. |
| 202 virtual void UpdateAutoSigninSnackbarVisibility(); |
| 203 |
199 // The wrapper around current state and data. | 204 // The wrapper around current state and data. |
200 ManagePasswordsState passwords_data_; | 205 ManagePasswordsState passwords_data_; |
201 | 206 |
202 // Used to measure the amount of time on a page; if it's less than some | 207 // Used to measure the amount of time on a page; if it's less than some |
203 // reasonable limit, then don't close the bubble upon navigation. We create | 208 // reasonable limit, then don't close the bubble upon navigation. We create |
204 // (and destroy) the timer in DidNavigateMainFrame. | 209 // (and destroy) the timer in DidNavigateMainFrame. |
205 scoped_ptr<base::ElapsedTimer> timer_; | 210 scoped_ptr<base::ElapsedTimer> timer_; |
206 | 211 |
207 // Contains true if the bubble is to be popped up in the next call to | 212 // Contains true if the bubble is to be popped up in the next call to |
208 // UpdateBubbleAndIconVisibility(). | 213 // UpdateBubbleAndIconVisibility(). |
209 bool should_pop_up_bubble_; | 214 bool should_pop_up_bubble_; |
210 | 215 |
211 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); | 216 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); |
212 }; | 217 }; |
213 | 218 |
214 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 219 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
OLD | NEW |