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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 void HandleSaveOrUpdateRequiredActions( | 437 void HandleSaveOrUpdateRequiredActions( |
438 const std::vector<wallet::RequiredAction>& required_actions); | 438 const std::vector<wallet::RequiredAction>& required_actions); |
439 | 439 |
440 // Whether submission is currently waiting for |action| to be handled. | 440 // Whether submission is currently waiting for |action| to be handled. |
441 bool IsSubmitPausedOn(wallet::RequiredAction action) const; | 441 bool IsSubmitPausedOn(wallet::RequiredAction action) const; |
442 | 442 |
443 // Called when there's nothing left to accept, update, save, or authenticate | 443 // Called when there's nothing left to accept, update, save, or authenticate |
444 // in order to fill |form_structure_| and pass data back to the invoking page. | 444 // in order to fill |form_structure_| and pass data back to the invoking page. |
445 void FinishSubmit(); | 445 void FinishSubmit(); |
446 | 446 |
| 447 // Writes to prefs the choice of AutofillDataModel for |section|. |
| 448 void PersistAutofillChoice(DialogSection section, |
| 449 const std::string& guid, |
| 450 int variant); |
| 451 |
| 452 // Sets the outparams to the default AutofillDataModel for |section| (which is |
| 453 // the first one in the menu that is a suggestion item). |
| 454 void GetDefaultAutofillChoice(DialogSection section, |
| 455 std::string* guid, |
| 456 int* variant); |
| 457 |
| 458 // Reads from prefs the choice of AutofillDataModel for |section|. Returns |
| 459 // whether there was a setting to read. |
| 460 bool GetAutofillChoice(DialogSection section, |
| 461 std::string* guid, |
| 462 int* variant); |
| 463 |
| 464 // Calculates which AutofillDataModel variant |model| is referring to. |
| 465 size_t GetSelectedVariantForModel(const SuggestionsMenuModel& model); |
| 466 |
447 // Logs metrics when the dialog is submitted. | 467 // Logs metrics when the dialog is submitted. |
448 void LogOnFinishSubmitMetrics(); | 468 void LogOnFinishSubmitMetrics(); |
449 | 469 |
450 // Logs metrics when the dialog is canceled. | 470 // Logs metrics when the dialog is canceled. |
451 void LogOnCancelMetrics(); | 471 void LogOnCancelMetrics(); |
452 | 472 |
453 // Logs metrics when the edit ui is shown for the given |section|. | 473 // Logs metrics when the edit ui is shown for the given |section|. |
454 void LogEditUiShownMetric(DialogSection section); | 474 void LogEditUiShownMetric(DialogSection section); |
455 | 475 |
456 // Logs metrics when a suggestion item from the given |model| is selected. | 476 // Logs metrics when a suggestion item from the given |model| is selected. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 | 602 |
583 // Whether the latency to display to the UI was logged to UMA yet. | 603 // Whether the latency to display to the UI was logged to UMA yet. |
584 bool was_ui_latency_logged_; | 604 bool was_ui_latency_logged_; |
585 | 605 |
586 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 606 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
587 }; | 607 }; |
588 | 608 |
589 } // namespace autofill | 609 } // namespace autofill |
590 | 610 |
591 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 611 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |