Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: components/autofill/renderer/autofill_agent.h

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 COMPONENTS_AUTOFILL_RENDERER_AUTOFILL_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_RENDERER_AUTOFILL_AGENT_H_
6 #define COMPONENTS_AUTOFILL_RENDERER_AUTOFILL_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_RENDERER_AUTOFILL_AGENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/timer.h" 15 #include "base/timer.h"
16 #include "components/autofill/common/autofill_export.h"
16 #include "components/autofill/renderer/form_cache.h" 17 #include "components/autofill/renderer/form_cache.h"
17 #include "components/autofill/renderer/page_click_listener.h" 18 #include "components/autofill/renderer/page_click_listener.h"
18 #include "content/public/renderer/render_view_observer.h" 19 #include "content/public/renderer/render_view_observer.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
22 23
23 namespace WebKit { 24 namespace WebKit {
24 class WebNode; 25 class WebNode;
25 class WebView; 26 class WebView;
26 } 27 }
27 28
28 namespace autofill { 29 namespace autofill {
29 30
30 struct FormData; 31 struct FormData;
31 struct FormFieldData; 32 struct FormFieldData;
32 struct WebElementDescriptor; 33 struct WebElementDescriptor;
33 class PasswordAutofillAgent; 34 class PasswordAutofillAgent;
34 35
35 // AutofillAgent deals with Autofill related communications between WebKit and 36 // AutofillAgent deals with Autofill related communications between WebKit and
36 // the browser. There is one AutofillAgent per RenderView. 37 // the browser. There is one AutofillAgent per RenderView.
37 // This code was originally part of RenderView. 38 // This code was originally part of RenderView.
38 // Note that Autofill encompasses: 39 // Note that Autofill encompasses:
39 // - single text field suggestions, that we usually refer to as Autocomplete, 40 // - single text field suggestions, that we usually refer to as Autocomplete,
40 // - password form fill, refered to as Password Autofill, and 41 // - password form fill, refered to as Password Autofill, and
41 // - entire form fill based on one field entry, referred to as Form Autofill. 42 // - entire form fill based on one field entry, referred to as Form Autofill.
42 43
43 class AutofillAgent : public content::RenderViewObserver, 44 class AUTOFILL_EXPORT AutofillAgent
44 public PageClickListener, 45 : public content::RenderViewObserver,
45 public WebKit::WebAutofillClient { 46 NON_EXPORTED_BASE(public PageClickListener),
47 NON_EXPORTED_BASE(public WebKit::WebAutofillClient) {
46 public: 48 public:
47 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. 49 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent.
48 AutofillAgent(content::RenderView* render_view, 50 AutofillAgent(content::RenderView* render_view,
49 PasswordAutofillAgent* password_autofill_manager); 51 PasswordAutofillAgent* password_autofill_manager);
50 virtual ~AutofillAgent(); 52 virtual ~AutofillAgent();
51 53
52 private: 54 private:
53 enum AutofillAction { 55 enum AutofillAction {
54 AUTOFILL_NONE, // No state set. 56 AUTOFILL_NONE, // No state set.
55 AUTOFILL_FILL, // Fill the Autofill form data. 57 AUTOFILL_FILL, // Fill the Autofill form data.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); 275 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername);
274 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); 276 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept);
275 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); 277 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect);
276 278
277 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); 279 DISALLOW_COPY_AND_ASSIGN(AutofillAgent);
278 }; 280 };
279 281
280 } // namespace autofill 282 } // namespace autofill
281 283
282 #endif // COMPONENTS_AUTOFILL_RENDERER_AUTOFILL_AGENT_H_ 284 #endif // COMPONENTS_AUTOFILL_RENDERER_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698