| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ | 5 #ifndef CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ |
| 6 #define CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ | 6 #define CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "chrome/renderer/autofill/form_cache.h" | 15 #include "chrome/renderer/autofill/form_cache.h" |
| 16 #include "chrome/renderer/page_click_listener.h" | 16 #include "chrome/renderer/page_click_listener.h" |
| 17 #include "content/public/renderer/render_view_observer.h" | 17 #include "content/public/renderer/render_view_observer.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 20 | 20 |
| 21 namespace webkit { | 21 namespace webkit { |
| 22 namespace forms { | 22 namespace forms { |
| 23 struct FormData; | 23 struct FormData; |
| 24 struct FormDataPredictions; | 24 struct FormDataPredictions; |
| 25 struct FormField; | 25 struct FormField; |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace WebKit { | 29 namespace WebKit { |
| 30 class WebMouseWheelEvent; |
| 30 class WebNode; | 31 class WebNode; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace autofill { | 34 namespace autofill { |
| 34 | 35 |
| 35 class PasswordAutofillManager; | 36 class PasswordAutofillManager; |
| 36 | 37 |
| 37 // AutofillAgent deals with Autofill related communications between WebKit and | 38 // AutofillAgent deals with Autofill related communications between WebKit and |
| 38 // the browser. There is one AutofillAgent per RenderView. | 39 // the browser. There is one AutofillAgent per RenderView. |
| 39 // This code was originally part of RenderView. | 40 // This code was originally part of RenderView. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 58 AUTOFILL_PREVIEW, // Preview the Autofill form data. | 59 AUTOFILL_PREVIEW, // Preview the Autofill form data. |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 // RenderView::Observer: | 62 // RenderView::Observer: |
| 62 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 63 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 63 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE; | 64 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE; |
| 64 virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE; | 65 virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE; |
| 65 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE; | 66 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE; |
| 66 virtual void WillSubmitForm(WebKit::WebFrame* frame, | 67 virtual void WillSubmitForm(WebKit::WebFrame* frame, |
| 67 const WebKit::WebFormElement& form) OVERRIDE; | 68 const WebKit::WebFormElement& form) OVERRIDE; |
| 69 virtual void DidHandleWheelEvent(const WebKit::WebMouseWheelEvent& event) |
| 70 OVERRIDE; |
| 68 | 71 |
| 69 // PageClickListener: | 72 // PageClickListener: |
| 70 virtual bool InputElementClicked(const WebKit::WebInputElement& element, | 73 virtual bool InputElementClicked(const WebKit::WebInputElement& element, |
| 71 bool was_focused, | 74 bool was_focused, |
| 72 bool is_focused) OVERRIDE; | 75 bool is_focused) OVERRIDE; |
| 73 virtual bool InputElementLostFocus() OVERRIDE; | 76 virtual bool InputElementLostFocus() OVERRIDE; |
| 74 | 77 |
| 75 // WebKit::WebAutofillClient: | 78 // WebKit::WebAutofillClient: |
| 76 virtual void didAcceptAutofillSuggestion(const WebKit::WebNode& node, | 79 virtual void didAcceptAutofillSuggestion(const WebKit::WebNode& node, |
| 77 const WebKit::WebString& value, | 80 const WebKit::WebString& value, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername); | 197 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername); |
| 195 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept); | 198 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept); |
| 196 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect); | 199 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionSelect); |
| 197 | 200 |
| 198 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 201 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 199 }; | 202 }; |
| 200 | 203 |
| 201 } // namespace autofill | 204 } // namespace autofill |
| 202 | 205 |
| 203 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ | 206 #endif // CHROME_RENDERER_AUTOFILL_AUTOFILL_AGENT_H_ |
| OLD | NEW |