// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ #include <vector> #include "base/containers/flat_map.h" #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/types/pass_key.h" #include "build/build_config.h" #include "components/autofill/core/browser/field_types.h" #include "components/autofill/core/common/aliases.h" #include "components/autofill/core/common/form_data.h" #include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h" #include "net/base/isolation_info.h" #include "ui/accessibility/ax_tree_id.h" #include "url/origin.h" namespace autofill { class FormStructure; class AutofillClient; class AutofillDriverFactory; class AutofillManager; namespace internal { class FormForest; } // AutofillDriver is Autofill's lowest-level abstraction of a frame that is // shared among all platforms. // // Most notably, it is a gateway for all communication from the browser code to // the DOM, or more precisely, to the AutofillAgent (which are different classes // of the same name in non-iOS vs iOS). // // The reverse communication, from the AutofillAgent to the browser code, goes // through mojom::AutofillDriver on non-iOS, and directly to AutofillManager on // iOS. // // Events for browser-internal communication do *NOT* belong here. Use // AutofillManager::Observer instead. // // An AutofillDriver corresponds to a frame, rather than a document, in the // sense that it may survive navigations. // // AutofillDriver has two implementations: // - AutofillDriverIOS for iOS, // - ContentAutofillDriver for all other platforms. // // An AutofillDriver's lifetime must be contained by the associated frame, // web::WebFrame on iOS and content::RenderFrameHost on non-iOS. This is ensured // by the AutofillDriverIOSFactory and ContentAutofillDriverFactory, // respectively, which own the AutofillDrivers. class AutofillDriver { … }; } // namespace autofill #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_