OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 scoped_ptr<risk::Fingerprint> fingerprint); | 272 scoped_ptr<risk::Fingerprint> fingerprint); |
273 | 273 |
274 // Opens the given URL in a new foreground tab. | 274 // Opens the given URL in a new foreground tab. |
275 virtual void OpenTabWithUrl(const GURL& url); | 275 virtual void OpenTabWithUrl(const GURL& url); |
276 | 276 |
277 // Exposed for testing. | 277 // Exposed for testing. |
278 const std::map<DialogSection, bool>& section_editing_state() const { | 278 const std::map<DialogSection, bool>& section_editing_state() const { |
279 return section_editing_state_; | 279 return section_editing_state_; |
280 } | 280 } |
281 | 281 |
| 282 // Should be called on the Wallet sign-in error. |
| 283 virtual void OnWalletSigninError(); |
| 284 |
282 private: | 285 private: |
283 // Whether or not the current request wants credit info back. | 286 // Whether or not the current request wants credit info back. |
284 bool RequestingCreditCardInfo() const; | 287 bool RequestingCreditCardInfo() const; |
285 | 288 |
286 // Whether the information input in this dialog will be securely transmitted | 289 // Whether the information input in this dialog will be securely transmitted |
287 // to the requesting site. | 290 // to the requesting site. |
288 bool TransmissionWillBeSecure() const; | 291 bool TransmissionWillBeSecure() const; |
289 | 292 |
290 // Initializes |suggested_email_| et al. | 293 // Initializes |suggested_email_| et al. |
291 void SuggestionsUpdated(); | 294 void SuggestionsUpdated(); |
292 | 295 |
293 // Whether the user's wallet items have at least one address and instrument. | 296 // Whether the user's wallet items have at least one address and instrument. |
294 bool HasCompleteWallet() const; | 297 bool HasCompleteWallet() const; |
295 | 298 |
296 // Starts fetching the wallet items from Online Wallet. | 299 // Starts fetching the wallet items from Online Wallet. |
297 void GetWalletItems(); | 300 void GetWalletItems(); |
298 | 301 |
299 // Stop showing sign in flow. | 302 // Stop showing sign in flow. |
300 void HideSignIn(); | 303 void HideSignIn(); |
301 | 304 |
302 // Handles the SignedInState() on Wallet or sign-in state update. | 305 // Handles the SignedInState() on Wallet or sign-in state update. |
303 // Triggers the user name fetch and the passive/automatic sign-in. | 306 // Triggers the user name fetch and the passive/automatic sign-in. |
304 void SignedInStateUpdated(); | 307 void SignedInStateUpdated(); |
305 | 308 |
306 // Refreshes the model on Wallet or sign-in state update. | 309 // Refreshes the model on Wallet or sign-in state update. |
307 void OnWalletOrSigninUpdate(); | 310 void OnWalletOrSigninUpdate(); |
308 | 311 |
309 // Should be called on the Wallet sign-in error. | |
310 void OnWalletSigninError(); | |
311 | |
312 // Calculates |legal_documents_text_| and |legal_document_link_ranges_| if | 312 // Calculates |legal_documents_text_| and |legal_document_link_ranges_| if |
313 // they have not already been calculated. | 313 // they have not already been calculated. |
314 void EnsureLegalDocumentsText(); | 314 void EnsureLegalDocumentsText(); |
315 | 315 |
316 // Clears previously entered manual input, shows editing UI if the current | 316 // Clears previously entered manual input, shows editing UI if the current |
317 // suggestion is invalid, and updates the |view_| (if it exists). | 317 // suggestion is invalid, and updates the |view_| (if it exists). |
318 void PrepareDetailInputsForSection(DialogSection section); | 318 void PrepareDetailInputsForSection(DialogSection section); |
319 | 319 |
320 // Creates a DataModelWrapper item for the item that's checked in the | 320 // Creates a DataModelWrapper item for the item that's checked in the |
321 // suggestion model for |section|. This may represent Autofill | 321 // suggestion model for |section|. This may represent Autofill |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 | 627 |
628 // Whether the latency to display to the UI was logged to UMA yet. | 628 // Whether the latency to display to the UI was logged to UMA yet. |
629 bool was_ui_latency_logged_; | 629 bool was_ui_latency_logged_; |
630 | 630 |
631 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 631 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
632 }; | 632 }; |
633 | 633 |
634 } // namespace autofill | 634 } // namespace autofill |
635 | 635 |
636 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 636 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |