| 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 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 68 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
| 69 // to RenderFrameObserver. Should eventually be removed. | 69 // to RenderFrameObserver. Should eventually be removed. |
| 70 // http://crbug.com/433486 | 70 // http://crbug.com/433486 |
| 71 class LegacyAutofillAgent : public content::RenderViewObserver { | 71 class LegacyAutofillAgent : public content::RenderViewObserver { |
| 72 public: | 72 public: |
| 73 LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); | 73 LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); |
| 74 ~LegacyAutofillAgent() override; | 74 ~LegacyAutofillAgent() override; |
| 75 | 75 |
| 76 // Shuts the LegacyAutofillAgent down on RenderFrame deletion. Safe to call |
| 77 // multiple times. |
| 78 void Shutdown(); |
| 79 |
| 76 private: | 80 private: |
| 77 // content::RenderViewObserver: | 81 // content::RenderViewObserver: |
| 78 void OnDestruct() override; | 82 void OnDestruct() override; |
| 79 void FocusChangeComplete() override; | 83 void FocusChangeComplete() override; |
| 80 | 84 |
| 81 AutofillAgent* agent_; | 85 AutofillAgent* agent_; |
| 82 | 86 |
| 83 DISALLOW_COPY_AND_ASSIGN(LegacyAutofillAgent); | 87 DISALLOW_COPY_AND_ASSIGN(LegacyAutofillAgent); |
| 84 }; | 88 }; |
| 85 friend class LegacyAutofillAgent; | 89 friend class LegacyAutofillAgent; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 114 | 118 |
| 115 // content::RenderFrameObserver: | 119 // content::RenderFrameObserver: |
| 116 bool OnMessageReceived(const IPC::Message& message) override; | 120 bool OnMessageReceived(const IPC::Message& message) override; |
| 117 void DidCommitProvisionalLoad(bool is_new_navigation, | 121 void DidCommitProvisionalLoad(bool is_new_navigation, |
| 118 bool is_same_page_navigation) override; | 122 bool is_same_page_navigation) override; |
| 119 void DidFinishDocumentLoad() override; | 123 void DidFinishDocumentLoad() override; |
| 120 void WillSendSubmitEvent(const blink::WebFormElement& form) override; | 124 void WillSendSubmitEvent(const blink::WebFormElement& form) override; |
| 121 void WillSubmitForm(const blink::WebFormElement& form) override; | 125 void WillSubmitForm(const blink::WebFormElement& form) override; |
| 122 void DidChangeScrollOffset() override; | 126 void DidChangeScrollOffset() override; |
| 123 void FocusedNodeChanged(const blink::WebNode& node) override; | 127 void FocusedNodeChanged(const blink::WebNode& node) override; |
| 128 void OnDestruct() override; |
| 129 |
| 130 // Shuts the AutofillAgent down on RenderFrame deletion. Safe to call multiple |
| 131 // times. |
| 132 void Shutdown(); |
| 124 | 133 |
| 125 // Pass-through from LegacyAutofillAgent. This correlates with the | 134 // Pass-through from LegacyAutofillAgent. This correlates with the |
| 126 // RenderViewObserver method. | 135 // RenderViewObserver method. |
| 127 void FocusChangeComplete(); | 136 void FocusChangeComplete(); |
| 128 | 137 |
| 129 // PageClickListener: | 138 // PageClickListener: |
| 130 void FormControlElementClicked(const blink::WebFormControlElement& element, | 139 void FormControlElementClicked(const blink::WebFormControlElement& element, |
| 131 bool was_focused) override; | 140 bool was_focused) override; |
| 132 | 141 |
| 133 // blink::WebAutofillClient: | 142 // blink::WebAutofillClient: |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 mojom::AutofillDriverPtr mojo_autofill_driver_; | 297 mojom::AutofillDriverPtr mojo_autofill_driver_; |
| 289 | 298 |
| 290 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 299 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
| 291 | 300 |
| 292 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 301 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 293 }; | 302 }; |
| 294 | 303 |
| 295 } // namespace autofill | 304 } // namespace autofill |
| 296 | 305 |
| 297 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 306 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| OLD | NEW |