/
atom_autofill_driver.h
44 lines (30 loc) · 1.24 KB
/
atom_autofill_driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2019 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_ATOM_AUTOFILL_DRIVER_H_
#define ATOM_BROWSER_ATOM_AUTOFILL_DRIVER_H_
#include <memory>
#if defined(TOOLKIT_VIEWS)
#include "shell/browser/ui/autofill_popup.h"
#endif
#include "mojo/public/cpp/bindings/associated_binding.h"
#include "shell/common/api/api.mojom.h"
namespace electron {
class AutofillDriver : public mojom::ElectronAutofillDriver {
public:
explicit AutofillDriver(content::RenderFrameHost* render_frame_host);
~AutofillDriver() override;
void BindRequest(mojom::ElectronAutofillDriverAssociatedRequest request);
void ShowAutofillPopup(const gfx::RectF& bounds,
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) override;
void HideAutofillPopup() override;
private:
content::RenderFrameHost* const render_frame_host_;
#if defined(TOOLKIT_VIEWS)
std::unique_ptr<AutofillPopup> autofill_popup_;
#endif
mojo::AssociatedBinding<mojom::ElectronAutofillDriver> binding_;
};
} // namespace electron
#endif // ATOM_BROWSER_ATOM_AUTOFILL_DRIVER_H_