| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // http://crbug.com/433486 | 60 // http://crbug.com/433486 |
| 61 class LegacyAutofillAgent : public content::RenderViewObserver { | 61 class LegacyAutofillAgent : public content::RenderViewObserver { |
| 62 public: | 62 public: |
| 63 LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); | 63 LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); |
| 64 ~LegacyAutofillAgent() override; | 64 ~LegacyAutofillAgent() override; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 // content::RenderViewObserver: | 67 // content::RenderViewObserver: |
| 68 void OnDestruct() override; | 68 void OnDestruct() override; |
| 69 void FocusedNodeChanged(const blink::WebNode& node) override; | 69 void FocusedNodeChanged(const blink::WebNode& node) override; |
| 70 void Resized() override; | 70 void FocusedElementMovedOnResize() override; |
| 71 void FocusChangeComplete() override; |
| 71 | 72 |
| 72 AutofillAgent* agent_; | 73 AutofillAgent* agent_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(LegacyAutofillAgent); | 75 DISALLOW_COPY_AND_ASSIGN(LegacyAutofillAgent); |
| 75 }; | 76 }; |
| 76 friend class LegacyAutofillAgent; | 77 friend class LegacyAutofillAgent; |
| 77 | 78 |
| 78 // Flags passed to ShowSuggestions. | 79 // Flags passed to ShowSuggestions. |
| 79 struct ShowSuggestionsOptions { | 80 struct ShowSuggestionsOptions { |
| 80 // All fields are default initialized to false. | 81 // All fields are default initialized to false. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 111 // content::RenderFrameObserver: | 112 // content::RenderFrameObserver: |
| 112 bool OnMessageReceived(const IPC::Message& message) override; | 113 bool OnMessageReceived(const IPC::Message& message) override; |
| 113 void DidCommitProvisionalLoad(bool is_new_navigation) override; | 114 void DidCommitProvisionalLoad(bool is_new_navigation) override; |
| 114 void DidFinishDocumentLoad() override; | 115 void DidFinishDocumentLoad() override; |
| 115 void WillSubmitForm(const blink::WebFormElement& form) override; | 116 void WillSubmitForm(const blink::WebFormElement& form) override; |
| 116 void DidChangeScrollOffset() override; | 117 void DidChangeScrollOffset() override; |
| 117 | 118 |
| 118 // Pass-throughs from LegacyAutofillAgent. These correlate with | 119 // Pass-throughs from LegacyAutofillAgent. These correlate with |
| 119 // RenderViewObserver methods. | 120 // RenderViewObserver methods. |
| 120 void FocusedNodeChanged(const blink::WebNode& node); | 121 void FocusedNodeChanged(const blink::WebNode& node); |
| 121 void Resized(); | 122 void FocusedElementMovedOnResize(); |
| 123 void FocusChangeComplete(); |
| 122 | 124 |
| 123 // PageClickListener: | 125 // PageClickListener: |
| 124 void FormControlElementClicked(const blink::WebFormControlElement& element, | 126 void FormControlElementClicked(const blink::WebFormControlElement& element, |
| 125 bool was_focused) override; | 127 bool was_focused) override; |
| 126 | 128 |
| 127 // blink::WebAutofillClient: | 129 // blink::WebAutofillClient: |
| 128 virtual void textFieldDidEndEditing( | 130 virtual void textFieldDidEndEditing( |
| 129 const blink::WebInputElement& element); | 131 const blink::WebInputElement& element); |
| 130 virtual void textFieldDidChange( | 132 virtual void textFieldDidChange( |
| 131 const blink::WebFormControlElement& element); | 133 const blink::WebFormControlElement& element); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 bool is_popup_possibly_visible_; | 261 bool is_popup_possibly_visible_; |
| 260 | 262 |
| 261 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 263 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
| 262 | 264 |
| 263 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 265 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 264 }; | 266 }; |
| 265 | 267 |
| 266 } // namespace autofill | 268 } // namespace autofill |
| 267 | 269 |
| 268 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 270 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| OLD | NEW |