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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 }; | 60 }; |
61 | 61 |
62 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 62 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
63 // to RenderFrameObserver. Should eventually be removed. | 63 // to RenderFrameObserver. Should eventually be removed. |
64 // http://crbug.com/433486 | 64 // http://crbug.com/433486 |
65 class LegacyAutofillAgent : public content::RenderViewObserver { | 65 class LegacyAutofillAgent : public content::RenderViewObserver { |
66 public: | 66 public: |
67 LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); | 67 LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); |
68 ~LegacyAutofillAgent() override; | 68 ~LegacyAutofillAgent() override; |
69 | 69 |
| 70 // Shuts the LegacyAutofillAgent down on RenderFrame deletion. Safe to call |
| 71 // multiple times. |
| 72 void Shutdown(); |
| 73 |
70 private: | 74 private: |
71 // content::RenderViewObserver: | 75 // content::RenderViewObserver: |
72 void OnDestruct() override; | 76 void OnDestruct() override; |
73 void FocusChangeComplete() override; | 77 void FocusChangeComplete() override; |
74 | 78 |
75 AutofillAgent* agent_; | 79 AutofillAgent* agent_; |
76 | 80 |
77 DISALLOW_COPY_AND_ASSIGN(LegacyAutofillAgent); | 81 DISALLOW_COPY_AND_ASSIGN(LegacyAutofillAgent); |
78 }; | 82 }; |
79 friend class LegacyAutofillAgent; | 83 friend class LegacyAutofillAgent; |
(...skipping 28 matching lines...) Expand all Loading... |
108 | 112 |
109 // content::RenderFrameObserver: | 113 // content::RenderFrameObserver: |
110 bool OnMessageReceived(const IPC::Message& message) override; | 114 bool OnMessageReceived(const IPC::Message& message) override; |
111 void DidCommitProvisionalLoad(bool is_new_navigation, | 115 void DidCommitProvisionalLoad(bool is_new_navigation, |
112 bool is_same_page_navigation) override; | 116 bool is_same_page_navigation) override; |
113 void DidFinishDocumentLoad() override; | 117 void DidFinishDocumentLoad() override; |
114 void WillSendSubmitEvent(const blink::WebFormElement& form) override; | 118 void WillSendSubmitEvent(const blink::WebFormElement& form) override; |
115 void WillSubmitForm(const blink::WebFormElement& form) override; | 119 void WillSubmitForm(const blink::WebFormElement& form) override; |
116 void DidChangeScrollOffset() override; | 120 void DidChangeScrollOffset() override; |
117 void FocusedNodeChanged(const blink::WebNode& node) override; | 121 void FocusedNodeChanged(const blink::WebNode& node) override; |
| 122 void OnDestruct() override; |
| 123 |
| 124 // Shuts the AutofillAgent down on RenderFrame deletion. Safe to call multiple |
| 125 // times. |
| 126 void Shutdown(); |
118 | 127 |
119 // Pass-through from LegacyAutofillAgent. This correlates with the | 128 // Pass-through from LegacyAutofillAgent. This correlates with the |
120 // RenderViewObserver method. | 129 // RenderViewObserver method. |
121 void FocusChangeComplete(); | 130 void FocusChangeComplete(); |
122 | 131 |
123 // PageClickListener: | 132 // PageClickListener: |
124 void FormControlElementClicked(const blink::WebFormControlElement& element, | 133 void FormControlElementClicked(const blink::WebFormControlElement& element, |
125 bool was_focused) override; | 134 bool was_focused) override; |
126 | 135 |
127 // blink::WebAutofillClient: | 136 // blink::WebAutofillClient: |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 bool is_generation_popup_possibly_visible_; | 283 bool is_generation_popup_possibly_visible_; |
275 | 284 |
276 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 285 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
277 | 286 |
278 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 287 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
279 }; | 288 }; |
280 | 289 |
281 } // namespace autofill | 290 } // namespace autofill |
282 | 291 |
283 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 292 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |