| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // Hides |popup_controller_|'s popup view, if it exists. | 385 // Hides |popup_controller_|'s popup view, if it exists. |
| 386 void HidePopup(); | 386 void HidePopup(); |
| 387 | 387 |
| 388 // Whether the user has chosen to enter all new data in |section|. This | 388 // Whether the user has chosen to enter all new data in |section|. This |
| 389 // happens via choosing "Add a new X..." from a section's suggestion menu. | 389 // happens via choosing "Add a new X..." from a section's suggestion menu. |
| 390 bool IsManuallyEditingSection(DialogSection section) const; | 390 bool IsManuallyEditingSection(DialogSection section) const; |
| 391 | 391 |
| 392 // Whether the user has chosen to enter all new data in at least one section. | 392 // Whether the user has chosen to enter all new data in at least one section. |
| 393 bool IsManuallyEditingAnySection() const; | 393 bool IsManuallyEditingAnySection() const; |
| 394 | 394 |
| 395 // Whether a particular DetailInput in |section| should be enabled or not. |
| 396 bool InputIsEnabled(const DetailInput& input, DialogSection section) const; |
| 397 |
| 395 // Returns true if the |value| is a valid string for the given autofill field | 398 // Returns true if the |value| is a valid string for the given autofill field |
| 396 // type. | 399 // type. |
| 397 bool InputIsValid(AutofillFieldType type, const string16& value) const; | 400 bool InputIsValid(AutofillFieldType type, const string16& value) const; |
| 398 | 401 |
| 399 // Whether all of the input fields currently showing in the dialog have valid | 402 // Whether all of the input fields currently showing in the dialog have valid |
| 400 // contents. | 403 // contents. |
| 401 bool AllSectionsAreValid() const; | 404 bool AllSectionsAreValid() const; |
| 402 | 405 |
| 403 // Whether all of the input fields currently showing in the given |section| of | 406 // Whether all of the input fields currently showing in the given |section| of |
| 404 // the dialog have valid contents. | 407 // the dialog have valid contents. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 625 |
| 623 // Whether the latency to display to the UI was logged to UMA yet. | 626 // Whether the latency to display to the UI was logged to UMA yet. |
| 624 bool was_ui_latency_logged_; | 627 bool was_ui_latency_logged_; |
| 625 | 628 |
| 626 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 629 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 627 }; | 630 }; |
| 628 | 631 |
| 629 } // namespace autofill | 632 } // namespace autofill |
| 630 | 633 |
| 631 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 634 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |