Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERER_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "components/autofill/content/public/interfaces/autofill_agent.mojom.h" | 15 #include "components/autofill/content/public/interfaces/autofill_agent.mojom.h" |
| 16 #include "components/autofill/content/public/interfaces/autofill_driver.mojom.h" | 16 #include "components/autofill/content/public/interfaces/autofill_driver.mojom.h" |
| 17 #include "components/autofill/content/renderer/form_cache.h" | 17 #include "components/autofill/content/renderer/form_cache.h" |
| 18 #include "components/autofill/content/renderer/page_click_listener.h" | 18 #include "components/autofill/content/renderer/page_click_listener.h" |
| 19 #include "content/public/renderer/render_frame_observer.h" | 19 #include "content/public/renderer/render_frame_observer.h" |
| 20 #include "content/public/renderer/render_view_observer.h" | 20 #include "content/public/renderer/render_view_observer.h" |
| 21 #include "mojo/public/cpp/bindings/binding_set.h" | 21 #include "mojo/public/cpp/bindings/binding_set.h" |
| 22 #include "third_party/WebKit/public/web/WebAutofillClient.h" | 22 #include "third_party/WebKit/public/web/WebAutofillClient.h" |
| 23 #include "third_party/WebKit/public/web/WebFormControlElement.h" | 23 #include "third_party/WebKit/public/web/WebFormControlElement.h" |
| 24 #include "third_party/WebKit/public/web/WebFormElement.h" | 24 #include "third_party/WebKit/public/web/WebFormElement.h" |
| 25 #include "third_party/WebKit/public/web/WebInputElement.h" | 25 #include "third_party/WebKit/public/web/WebInputElement.h" |
| 26 | 26 |
| 27 namespace { | |
| 28 class MockAutofillAgent; | |
| 29 } | |
| 30 | |
| 27 namespace blink { | 31 namespace blink { |
| 28 class WebNode; | 32 class WebNode; |
| 29 class WebView; | 33 class WebView; |
| 30 } | 34 } |
| 31 | 35 |
| 32 namespace autofill { | 36 namespace autofill { |
| 33 | 37 |
| 34 struct FormData; | 38 struct FormData; |
| 35 struct FormFieldData; | 39 struct FormFieldData; |
| 36 struct PasswordFormFillData; | 40 struct PasswordFormFillData; |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 53 // PasswordGenerationAgent may be NULL. If it is not, then it is also | 57 // PasswordGenerationAgent may be NULL. If it is not, then it is also |
| 54 // guaranteed to outlive AutofillAgent. | 58 // guaranteed to outlive AutofillAgent. |
| 55 AutofillAgent(content::RenderFrame* render_frame, | 59 AutofillAgent(content::RenderFrame* render_frame, |
| 56 PasswordAutofillAgent* password_autofill_manager, | 60 PasswordAutofillAgent* password_autofill_manager, |
| 57 PasswordGenerationAgent* password_generation_agent); | 61 PasswordGenerationAgent* password_generation_agent); |
| 58 ~AutofillAgent() override; | 62 ~AutofillAgent() override; |
| 59 | 63 |
| 60 void BindRequest(mojom::AutofillAgentRequest request); | 64 void BindRequest(mojom::AutofillAgentRequest request); |
| 61 | 65 |
| 62 private: | 66 private: |
| 67 friend class ::MockAutofillAgent; | |
|
vabr (Chromium)
2016/06/22 05:50:35
Instead of the friend declaration, could you make
keishi
2016/06/22 08:27:35
Done.
| |
| 68 | |
| 63 // Functor used as a simplified comparison function for FormData. Only | 69 // Functor used as a simplified comparison function for FormData. Only |
| 64 // compares forms at a high level (notably name, origin, action). | 70 // compares forms at a high level (notably name, origin, action). |
| 65 struct FormDataCompare { | 71 struct FormDataCompare { |
| 66 bool operator()(const FormData& lhs, const FormData& rhs) const; | 72 bool operator()(const FormData& lhs, const FormData& rhs) const; |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 75 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
| 70 // to RenderFrameObserver. Should eventually be removed. | 76 // to RenderFrameObserver. Should eventually be removed. |
| 71 // http://crbug.com/433486 | 77 // http://crbug.com/433486 |
| 72 class LegacyAutofillAgent : public content::RenderViewObserver { | 78 class LegacyAutofillAgent : public content::RenderViewObserver { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 294 mojom::AutofillDriverPtr mojo_autofill_driver_; | 300 mojom::AutofillDriverPtr mojo_autofill_driver_; |
| 295 | 301 |
| 296 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 302 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
| 297 | 303 |
| 298 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 304 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 299 }; | 305 }; |
| 300 | 306 |
| 301 } // namespace autofill | 307 } // namespace autofill |
| 302 | 308 |
| 303 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 309 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| OLD | NEW |