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 // Returns true if the |value| is a valid string for the given autofill field | |
396 // type. | |
397 bool InputIsValid(AutofillFieldType type, const string16& value) const; | |
398 | |
399 // Whether all of the input fields currently showing in the dialog have valid | 395 // Whether all of the input fields currently showing in the dialog have valid |
400 // contents. | 396 // contents. |
401 bool AllSectionsAreValid() const; | 397 bool AllSectionsAreValid() const; |
402 | 398 |
403 // Whether all of the input fields currently showing in the given |section| of | 399 // Whether all of the input fields currently showing in the given |section| of |
404 // the dialog have valid contents. | 400 // the dialog have valid contents. |
405 bool SectionIsValid(DialogSection section) const; | 401 bool SectionIsValid(DialogSection section) const; |
406 | 402 |
407 // Returns true if |key| refers to a suggestion, as opposed to some control | 403 // Returns true if |key| refers to a suggestion, as opposed to some control |
408 // menu item. | 404 // menu item. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 618 |
623 // Whether the latency to display to the UI was logged to UMA yet. | 619 // Whether the latency to display to the UI was logged to UMA yet. |
624 bool was_ui_latency_logged_; | 620 bool was_ui_latency_logged_; |
625 | 621 |
626 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 622 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
627 }; | 623 }; |
628 | 624 |
629 } // namespace autofill | 625 } // namespace autofill |
630 | 626 |
631 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 627 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |