diff options
Diffstat (limited to 'chromium/components/autofill/core/browser/browser_autofill_manager.h')
-rw-r--r-- | chromium/components/autofill/core/browser/browser_autofill_manager.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chromium/components/autofill/core/browser/browser_autofill_manager.h b/chromium/components/autofill/core/browser/browser_autofill_manager.h index 53b2df6b1da..9d66ebf1e79 100644 --- a/chromium/components/autofill/core/browser/browser_autofill_manager.h +++ b/chromium/components/autofill/core/browser/browser_autofill_manager.h @@ -20,7 +20,9 @@ #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" +#if !defined(TOOLKIT_QT) #include "components/autofill/core/browser/autocomplete_history_manager.h" +#endif #include "components/autofill/core/browser/autofill_ablation_study.h" #include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/browser/autofill_driver.h" @@ -28,6 +30,7 @@ #include "components/autofill/core/browser/autofill_manager.h" #include "components/autofill/core/browser/field_filler.h" #include "components/autofill/core/browser/form_types.h" +#if !defined(TOOLKIT_QT) #include "components/autofill/core/browser/metrics/form_events/address_form_event_logger.h" #include "components/autofill/core/browser/metrics/form_events/credit_card_form_event_logger.h" #include "components/autofill/core/browser/payments/autofill_offer_manager.h" @@ -37,6 +40,7 @@ #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/single_field_form_fill_router.h" #include "components/autofill/core/browser/sync_utils.h" +#endif // !defined(TOOLKIT_QT) #include "components/autofill/core/browser/ui/popup_types.h" #include "components/autofill/core/common/dense_set.h" #include "components/autofill/core/common/form_data.h" @@ -75,9 +79,13 @@ enum class ValuePatternsMetric { // Manages saving and restoring the user's personal information entered into web // forms. One per frame; owned by the AutofillDriver. +#if !defined(TOOLKIT_QT) class BrowserAutofillManager : public AutofillManager, public SingleFieldFormFiller::SuggestionsHandler, public CreditCardAccessManager::Accessor { +#else +class BrowserAutofillManager : public AutofillManager { +#endif // !defined(TOOLKIT_QT) public: BrowserAutofillManager(AutofillDriver* driver, AutofillClient* client, @@ -87,6 +95,7 @@ class BrowserAutofillManager : public AutofillManager, BrowserAutofillManager(const BrowserAutofillManager&) = delete; BrowserAutofillManager& operator=(const BrowserAutofillManager&) = delete; +#if !defined(TOOLKIT_QT) ~BrowserAutofillManager() override; void ShowAutofillSettings(bool show_credit_card_settings); @@ -220,6 +229,7 @@ class BrowserAutofillManager : public AutofillManager, // Invoked when the popup view can't be created. Main usage is to collect // metrics. void DidSuppressPopup(const FormData& form, const FormFieldData& field); +#endif // !defined(TOOLKIT_QT) // AutofillManager: void OnFocusNoLongerOnForm(bool had_interacted_form) override; @@ -237,11 +247,13 @@ class BrowserAutofillManager : public AutofillManager, const std::vector<FormStructure*>& forms) override; void Reset() override; +#if !defined(TOOLKIT_QT) // SingleFieldFormFiller::SuggestionsHandler: void OnSuggestionsReturned( int query_id, bool autoselect_first_suggestion, const std::vector<Suggestion>& suggestions) override; +#endif // Returns true if either Profile or CreditCard Autofill is enabled. virtual bool IsAutofillEnabled() const; @@ -254,6 +266,7 @@ class BrowserAutofillManager : public AutofillManager, // the client supports Autofill. virtual bool IsAutofillCreditCardEnabled() const; +#if !defined(TOOLKIT_QT) // Shared code to determine if |form| should be uploaded to the Autofill // server. It verifies that uploading is allowed and |form| meets conditions // to be uploadable. Exposed for testing. @@ -270,6 +283,7 @@ class BrowserAutofillManager : public AutofillManager, bool has_observed_one_time_code_field() const { return has_observed_one_time_code_field_; } +#endif // !defined(TOOLKIT_QT) #if defined(UNIT_TEST) void SetExternalDelegateForTest( @@ -323,6 +337,7 @@ class BrowserAutofillManager : public AutofillManager, AutofillDownloadManagerState enable_download_manager = DISABLE_AUTOFILL_DOWNLOAD_MANAGER); +#if !defined(TOOLKIT_QT) // Uploads the form data to the Autofill server. |observed_submission| // indicates that upload is the result of a submission event. virtual void UploadFormData(const FormStructure& submitted_form, @@ -350,6 +365,7 @@ class BrowserAutofillManager : public AutofillManager, void SplitFrontendID(int frontend_id, std::string* cc_backend_id, std::string* profile_backend_id) const; +#endif // !defined(TOOLKIT_QT) // AutofillManager: void OnFormSubmittedImpl(const FormData& form, @@ -376,8 +392,10 @@ class BrowserAutofillManager : public AutofillManager, const FormStructure& form_structure) override; void OnAfterProcessParsedForms(const DenseSet<FormType>& form_types) override; +#if !defined(TOOLKIT_QT) // Exposed for testing. FormData* pending_form_data() { return pending_form_data_.get(); } +#endif #ifdef UNIT_TEST void set_single_field_form_fill_router_for_test( @@ -401,6 +419,7 @@ class BrowserAutofillManager : public AutofillManager, FRIEND_TEST_ALL_PREFIXES(BrowserAutofillManagerTest, PageLanguageGetsCorrectlyDetected); +#if !defined(TOOLKIT_QT) // Keeps track of the filling context for a form, used to make refill attemps. struct FillingContext { // |profile_or_credit_card| contains either AutofillProfile or CreditCard @@ -433,6 +452,7 @@ class BrowserAutofillManager : public AutofillManager, // The field type groups that were initially filled. std::set<FieldTypeGroup> type_groups_originally_filled; }; +#endif // !defined(TOOLKIT_QT) // Indicates the reason why autofill suggestions are suppressed. enum class SuppressReason { @@ -481,6 +501,7 @@ class BrowserAutofillManager : public AutofillManager, AblationGroup conditional_ablation_group = AblationGroup::kDefault; }; +#if !defined(TOOLKIT_QT) // CreditCardAccessManager::Accessor void OnCreditCardFetched( CreditCardFetchResult result, @@ -671,6 +692,7 @@ class BrowserAutofillManager : public AutofillManager, // May return nullptr. FormEventLoggerBase* GetEventFormLogger( FieldTypeGroup field_type_group) const; +#endif // !defined(TOOLKIT_QT) void SetDataList(const std::vector<std::u16string>& values, const std::vector<std::u16string>& labels); @@ -687,6 +709,7 @@ class BrowserAutofillManager : public AutofillManager, // May be NULL. NULL indicates OTR. raw_ptr<PersonalDataManager> personal_data_; +#if !defined(TOOLKIT_QT) // Used to help fill data into fields. FieldFiller field_filler_; @@ -764,6 +787,7 @@ class BrowserAutofillManager : public AutofillManager, // Used to record metrics. This should be set at the beginning of the // interaction and re-used throughout the context of this manager. AutofillSyncSigninState sync_state_ = AutofillSyncSigninState::kNumSyncStates; +#endif // !defined(TOOLKIT_QT) base::WeakPtrFactory<BrowserAutofillManager> weak_ptr_factory_{this}; |