refactor: use upstream AutofillDriverFactory diffs (#31676)

* refactor: use upstream AutofillDriverFactory diffs

Update our copy of AutofillDriver and AutofillDriverFactory to match chromium.
This commit is contained in:
Charles Kerr 2021-11-03 12:17:06 -05:00 committed by GitHub
parent 24b02d68a7
commit 190dd31dbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 62 additions and 45 deletions

View file

@ -20,12 +20,15 @@ namespace electron {
class AutofillDriver : public mojom::ElectronAutofillDriver {
public:
AutofillDriver(
content::RenderFrameHost* render_frame_host,
mojo::PendingAssociatedReceiver<mojom::ElectronAutofillDriver> request);
explicit AutofillDriver(content::RenderFrameHost* render_frame_host);
AutofillDriver(const AutofillDriver&) = delete;
AutofillDriver& operator=(const AutofillDriver&) = delete;
~AutofillDriver() override;
void BindPendingReceiver(
mojo::PendingAssociatedReceiver<mojom::ElectronAutofillDriver>
pending_receiver);
void ShowAutofillPopup(const gfx::RectF& bounds,
const std::vector<std::u16string>& values,
const std::vector<std::u16string>& labels) override;
@ -38,7 +41,7 @@ class AutofillDriver : public mojom::ElectronAutofillDriver {
std::unique_ptr<AutofillPopup> autofill_popup_;
#endif
mojo::AssociatedReceiver<mojom::ElectronAutofillDriver> receiver_;
mojo::AssociatedReceiver<mojom::ElectronAutofillDriver> receiver_{this};
};
} // namespace electron