| OLD | NEW |
| 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 NavigationHandle; |
| 20 class RenderFrameHost; | 21 class RenderFrameHost; |
| 21 struct FrameNavigateParams; | |
| 22 struct LoadCommittedDetails; | |
| 23 } | 22 } |
| 24 | 23 |
| 25 namespace autofill { | 24 namespace autofill { |
| 26 | 25 |
| 27 class AutofillClient; | 26 class AutofillClient; |
| 28 | 27 |
| 29 // Class that drives autofill flow in the browser process based on | 28 // Class that drives autofill flow in the browser process based on |
| 30 // communication from the renderer and from the external world. There is one | 29 // communication from the renderer and from the external world. There is one |
| 31 // instance per RenderFrameHost. | 30 // instance per RenderFrameHost. |
| 32 class ContentAutofillDriver : public AutofillDriver, | 31 class ContentAutofillDriver : public AutofillDriver, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. | 93 // Called when the frame has navigated. |
| 95 void DidNavigateFrame(const content::LoadCommittedDetails& details, | 94 void DidNavigateFrame(content::NavigationHandle* navigation_handle); |
| 96 const content::FrameNavigateParams& params); | |
| 97 | 95 |
| 98 // Tells the render frame that a user gesture was observed | 96 // Tells the render frame that a user gesture was observed |
| 99 // somewhere in the tab (including in a different frame). | 97 // somewhere in the tab (including in a different frame). |
| 100 void NotifyFirstUserGestureObservedInTab(); | 98 void NotifyFirstUserGestureObservedInTab(); |
| 101 | 99 |
| 102 AutofillExternalDelegate* autofill_external_delegate() { | 100 AutofillExternalDelegate* autofill_external_delegate() { |
| 103 return &autofill_external_delegate_; | 101 return &autofill_external_delegate_; |
| 104 } | 102 } |
| 105 | 103 |
| 106 AutofillManager* autofill_manager() { return autofill_manager_.get(); } | 104 AutofillManager* autofill_manager() { return autofill_manager_.get(); } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 130 AutofillExternalDelegate autofill_external_delegate_; | 128 AutofillExternalDelegate autofill_external_delegate_; |
| 131 | 129 |
| 132 mojo::Binding<mojom::AutofillDriver> binding_; | 130 mojo::Binding<mojom::AutofillDriver> binding_; |
| 133 | 131 |
| 134 mojom::AutofillAgentPtr autofill_agent_; | 132 mojom::AutofillAgentPtr autofill_agent_; |
| 135 }; | 133 }; |
| 136 | 134 |
| 137 } // namespace autofill | 135 } // namespace autofill |
| 138 | 136 |
| 139 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ | 137 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ |
| OLD | NEW |