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

Side by Side Diff: components/autofill/content/browser/content_autofill_driver.h

Issue 2606473003: Use AutofillDriver* in ContentAutofillDriverFactory when possible (Closed)
Patch Set: Fix Android compilation Created 3 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
12 #include "components/autofill/content/common/autofill_agent.mojom.h" 12 #include "components/autofill/content/common/autofill_agent.mojom.h"
13 #include "components/autofill/content/common/autofill_driver.mojom.h" 13 #include "components/autofill/content/common/autofill_driver.mojom.h"
14 #include "components/autofill/core/browser/autofill_driver.h" 14 #include "components/autofill/core/browser/autofill_driver.h"
15 #include "components/autofill/core/browser/autofill_external_delegate.h" 15 #include "components/autofill/core/browser/autofill_external_delegate.h"
16 #include "components/autofill/core/browser/autofill_manager.h" 16 #include "components/autofill/core/browser/autofill_manager.h"
17 #include "mojo/public/cpp/bindings/binding.h" 17 #include "mojo/public/cpp/bindings/binding.h"
18 18
19 namespace content { 19 namespace content {
20 class RenderFrameHost; 20 class RenderFrameHost;
21 struct FrameNavigateParams;
22 struct LoadCommittedDetails;
23 } 21 }
24 22
25 namespace autofill { 23 namespace autofill {
26 24
27 class AutofillClient; 25 class AutofillClient;
28 26
29 // Class that drives autofill flow in the browser process based on 27 // Class that drives autofill flow in the browser process based on
30 // communication from the renderer and from the external world. There is one 28 // communication from the renderer and from the external world. There is one
31 // instance per RenderFrameHost. 29 // instance per RenderFrameHost.
32 class ContentAutofillDriver : public AutofillDriver, 30 class ContentAutofillDriver : public AutofillDriver,
(...skipping 28 matching lines...) Expand all
61 const base::string16& value) override; 59 const base::string16& value) override;
62 void RendererShouldClearFilledForm() override; 60 void RendererShouldClearFilledForm() override;
63 void RendererShouldClearPreviewedForm() override; 61 void RendererShouldClearPreviewedForm() override;
64 void RendererShouldFillFieldWithValue(const base::string16& value) override; 62 void RendererShouldFillFieldWithValue(const base::string16& value) override;
65 void RendererShouldPreviewFieldWithValue( 63 void RendererShouldPreviewFieldWithValue(
66 const base::string16& value) override; 64 const base::string16& value) override;
67 void PopupHidden() override; 65 void PopupHidden() override;
68 gfx::RectF TransformBoundingBoxToViewportCoordinates( 66 gfx::RectF TransformBoundingBoxToViewportCoordinates(
69 const gfx::RectF& bounding_box) override; 67 const gfx::RectF& bounding_box) override;
70 void DidInteractWithCreditCardForm() override; 68 void DidInteractWithCreditCardForm() override;
69 void NavigatedToDifferentPage() override;
71 70
72 // mojom::AutofillDriver: 71 // mojom::AutofillDriver:
73 void FirstUserGestureObserved() override; 72 void FirstUserGestureObserved() override;
74 void FormsSeen(const std::vector<FormData>& forms, 73 void FormsSeen(const std::vector<FormData>& forms,
75 base::TimeTicks timestamp) override; 74 base::TimeTicks timestamp) override;
76 void WillSubmitForm(const FormData& form, base::TimeTicks timestamp) override; 75 void WillSubmitForm(const FormData& form, base::TimeTicks timestamp) override;
77 void FormSubmitted(const FormData& form) override; 76 void FormSubmitted(const FormData& form) override;
78 void TextFieldDidChange(const FormData& form, 77 void TextFieldDidChange(const FormData& form,
79 const FormFieldData& field, 78 const FormFieldData& field,
80 base::TimeTicks timestamp) override; 79 base::TimeTicks timestamp) override;
81 void QueryFormFieldAutofill(int32_t id, 80 void QueryFormFieldAutofill(int32_t id,
82 const FormData& form, 81 const FormData& form,
83 const FormFieldData& field, 82 const FormFieldData& field,
84 const gfx::RectF& bounding_box) override; 83 const gfx::RectF& bounding_box) override;
85 void HidePopup() override; 84 void HidePopup() override;
86 void FocusNoLongerOnForm() override; 85 void FocusNoLongerOnForm() override;
87 void DidFillAutofillFormData(const FormData& form, 86 void DidFillAutofillFormData(const FormData& form,
88 base::TimeTicks timestamp) override; 87 base::TimeTicks timestamp) override;
89 void DidPreviewAutofillFormData() override; 88 void DidPreviewAutofillFormData() override;
90 void DidEndTextFieldEditing() override; 89 void DidEndTextFieldEditing() override;
91 void SetDataList(const std::vector<base::string16>& values, 90 void SetDataList(const std::vector<base::string16>& values,
92 const std::vector<base::string16>& labels) override; 91 const std::vector<base::string16>& labels) override;
93 92
94 // Called when the frame has navigated.
95 void DidNavigateFrame(const content::LoadCommittedDetails& details,
96 const content::FrameNavigateParams& params);
97
98 // Tells the render frame that a user gesture was observed 93 // Tells the render frame that a user gesture was observed
99 // somewhere in the tab (including in a different frame). 94 // somewhere in the tab (including in a different frame).
100 void NotifyFirstUserGestureObservedInTab(); 95 void NotifyFirstUserGestureObservedInTab();
101 96
102 AutofillExternalDelegate* autofill_external_delegate() { 97 AutofillExternalDelegate* autofill_external_delegate() {
103 return &autofill_external_delegate_; 98 return &autofill_external_delegate_;
104 } 99 }
105 100
106 AutofillManager* autofill_manager() { return autofill_manager_.get(); } 101 AutofillManager* autofill_manager() { return autofill_manager_.get(); }
107 content::RenderFrameHost* render_frame_host() { return render_frame_host_; } 102 content::RenderFrameHost* render_frame_host() { return render_frame_host_; }
(...skipping 22 matching lines...) Expand all
130 AutofillExternalDelegate autofill_external_delegate_; 125 AutofillExternalDelegate autofill_external_delegate_;
131 126
132 mojo::Binding<mojom::AutofillDriver> binding_; 127 mojo::Binding<mojom::AutofillDriver> binding_;
133 128
134 mojom::AutofillAgentPtr autofill_agent_; 129 mojom::AutofillAgentPtr autofill_agent_;
135 }; 130 };
136 131
137 } // namespace autofill 132 } // namespace autofill
138 133
139 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ 134 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_
OLDNEW
« no previous file with comments | « components/autofill/content/browser/BUILD.gn ('k') | components/autofill/content/browser/content_autofill_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698