Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1691)

Unified Diff: components/autofill/core/browser/autofill_handler_proxy.cc

Issue 2839023003: WebView autofill implementation (Closed)
Patch Set: Refactoring AutofillManager Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_handler_proxy.cc
diff --git a/components/autofill/core/browser/autofill_handler_proxy.cc b/components/autofill/core/browser/autofill_handler_proxy.cc
new file mode 100644
index 0000000000000000000000000000000000000000..04ef490a88580e4b1dafb1f17dc41b8e122ee418
--- /dev/null
+++ b/components/autofill/core/browser/autofill_handler_proxy.cc
@@ -0,0 +1,72 @@
+// Copyright 2013 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,
+ AutofillProvider* provider)
+ : AutofillHandler(driver), provider_(provider), weak_ptr_factory_(this) {}
+
+AutofillHandlerProxy::~AutofillHandlerProxy() {}
+
+bool AutofillHandlerProxy::OnWillSubmitFormImpl(const FormData& form,
+ const TimeTicks& timestamp) {
+ provider_->OnWillSubmitForm(this, form, timestamp);
Roger McFarlane (Chromium) 2017/05/24 04:18:22 should the provider return a bool?
michaelbai 2017/05/24 05:14:09 this return value seemed no meaning for AutofillPr
Roger McFarlane (Chromium) 2017/05/24 20:03:31 It's supposed to mean "I took a look at the submit
michaelbai 2017/05/26 23:12:08 I tried to change it to void, but it seemed that
+ return true;
+}
+
+void AutofillHandlerProxy::OnTextFieldDidChangeImpl(
+ const FormData& form,
+ const FormFieldData& field,
+ const TimeTicks& timestamp) {
+ provider_->OnTextFieldDidChange(this, form, field, timestamp);
+}
+
+void AutofillHandlerProxy::OnQueryFormFieldAutofillImpl(
+ int query_id,
+ const FormData& form,
+ const FormFieldData& field,
+ const gfx::RectF& bounding_box) {
+ provider_->OnQueryFormFieldAutofill(this, query_id, form, field,
+ bounding_box);
+}
+
+void AutofillHandlerProxy::OnFocusNoLongerOnForm() {
+ provider_->OnFocusNoLongerOnForm(this);
+}
+
+void AutofillHandlerProxy::OnDidFillAutofillFormData(
+ const FormData& form,
+ const base::TimeTicks& timestamp) {
+ provider_->OnDidFillAutofillFormData(this, form, timestamp);
+}
+
+void AutofillHandlerProxy::OnDidPreviewAutofillFormData() {}
+
+void AutofillHandlerProxy::OnFormsSeen(const std::vector<FormData>& forms,
+ const base::TimeTicks& timestamp) {}
+
+bool AutofillHandlerProxy::OnFormSubmitted(const FormData& form) {
+ return false;
+}
+
+void AutofillHandlerProxy::OnDidEndTextFieldEditing() {}
+
+void AutofillHandlerProxy::OnHidePopup() {}
+
+void AutofillHandlerProxy::OnSetDataList(
+ const std::vector<base::string16>& values,
+ const std::vector<base::string16>& labels) {}
+
+void AutofillHandlerProxy::Reset() {
+ provider_->Reset(this);
+}
+
+} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698