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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/autofill/core/browser/autofill_handler_proxy.h"
#include "components/autofill/core/browser/autofill_provider.h"
namespace autofill {
using base::TimeTicks;
AutofillHandlerProxy::AutofillHandlerProxy(AutofillDriver* driver,
LogManager* log_manager,
AutofillProvider* provider)
: AutofillHandler(driver, log_manager), provider_(provider) {}
AutofillHandlerProxy::~AutofillHandlerProxy() {}
void AutofillHandlerProxy::OnFormSubmittedImpl(const FormData& form,
bool known_success,
mojom::SubmissionSource source) {
provider_->OnFormSubmitted(this, form, known_success, source);
}
void AutofillHandlerProxy::OnTextFieldDidChangeImpl(
const FormData& form,
const FormFieldData& field,
const gfx::RectF& bounding_box,
const TimeTicks timestamp) {
provider_->OnTextFieldDidChange(this, form, field, bounding_box, timestamp);
}
void AutofillHandlerProxy::OnTextFieldDidScrollImpl(
const FormData& form,
const FormFieldData& field,
const gfx::RectF& bounding_box) {
provider_->OnTextFieldDidScroll(this, form, field, bounding_box);
}
void AutofillHandlerProxy::OnQueryFormFieldAutofillImpl(
int query_id,
const FormData& form,
const FormFieldData& field,
const gfx::RectF& bounding_box,
bool autoselect_first_suggestion) {
provider_->OnQueryFormFieldAutofill(this, query_id, form, field, bounding_box,
autoselect_first_suggestion);
}
void AutofillHandlerProxy::OnFocusOnFormFieldImpl(
const FormData& form,
const FormFieldData& field,
const gfx::RectF& bounding_box) {
provider_->OnFocusOnFormField(this, form, field, bounding_box);
}
void AutofillHandlerProxy::OnSelectControlDidChangeImpl(
const FormData& form,
const FormFieldData& field,
const gfx::RectF& bounding_box) {
provider_->OnSelectControlDidChange(this, form, field, bounding_box);
}
bool AutofillHandlerProxy::ShouldParseForms(const std::vector<FormData>& forms,
const base::TimeTicks timestamp) {
provider_->OnFormsSeen(this, forms, timestamp);
// Need to parse the |forms| to FormStructure, so heuristic_type can be
// retrieved later.
return true;
}
void AutofillHandlerProxy::OnFormsParsed(
const std::vector<const FormData*>& form_structures,
const base::TimeTicks timestamp) {}
void AutofillHandlerProxy::OnFocusNoLongerOnForm(bool had_interacted_form) {
provider_->OnFocusNoLongerOnForm(this, had_interacted_form);
}
void AutofillHandlerProxy::OnDidFillAutofillFormData(
const FormData& form,
const base::TimeTicks timestamp) {
provider_->OnDidFillAutofillFormData(this, form, timestamp);
}
void AutofillHandlerProxy::OnDidPreviewAutofillFormData() {}
void AutofillHandlerProxy::OnDidEndTextFieldEditing() {}
void AutofillHandlerProxy::OnHidePopup() {
provider_->OnHidePopup(this);
}
void AutofillHandlerProxy::SelectFieldOptionsDidChange(const FormData& form) {}
void AutofillHandlerProxy::Reset() {
provider_->Reset(this);
}
} // namespace autofill
|