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_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 30 matching lines...) Expand all Loading... |
41 }; | 41 }; |
42 | 42 |
43 namespace IPC { | 43 namespace IPC { |
44 class Message; | 44 class Message; |
45 } | 45 } |
46 | 46 |
47 namespace webkit { | 47 namespace webkit { |
48 namespace forms { | 48 namespace forms { |
49 struct FormData; | 49 struct FormData; |
50 struct FormField; | 50 struct FormField; |
| 51 struct PasswordFormFillData; |
51 } | 52 } |
52 } | 53 } |
53 | 54 |
54 // Manages saving and restoring the user's personal information entered into web | 55 // Manages saving and restoring the user's personal information entered into web |
55 // forms. | 56 // forms. |
56 class AutofillManager : public content::WebContentsObserver, | 57 class AutofillManager : public content::WebContentsObserver, |
57 public AutofillDownloadManager::Observer, | 58 public AutofillDownloadManager::Observer, |
58 public base::RefCounted<AutofillManager> { | 59 public base::RefCounted<AutofillManager> { |
59 public: | 60 public: |
60 explicit AutofillManager(TabContentsWrapper* tab_contents); | 61 explicit AutofillManager(TabContentsWrapper* tab_contents); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 const base::TimeTicks& timestamp); | 156 const base::TimeTicks& timestamp); |
156 | 157 |
157 // The |bounding_box| is a window relative value. | 158 // The |bounding_box| is a window relative value. |
158 void OnQueryFormFieldAutofill(int query_id, | 159 void OnQueryFormFieldAutofill(int query_id, |
159 const webkit::forms::FormData& form, | 160 const webkit::forms::FormData& form, |
160 const webkit::forms::FormField& field, | 161 const webkit::forms::FormField& field, |
161 const gfx::Rect& bounding_box, | 162 const gfx::Rect& bounding_box, |
162 bool display_warning); | 163 bool display_warning); |
163 void OnDidEndTextFieldEditing(); | 164 void OnDidEndTextFieldEditing(); |
164 void OnHideAutofillPopup(); | 165 void OnHideAutofillPopup(); |
| 166 void OnFrameClosing(int frame_id); |
| 167 void OnFillPasswordForm( |
| 168 const webkit::forms::FormField& form, |
| 169 const webkit::forms::PasswordFormFillData fill_data, |
| 170 int frame_id); |
165 | 171 |
166 // Fills |host| with the RenderViewHost for this tab. | 172 // Fills |host| with the RenderViewHost for this tab. |
167 // Returns false if Autofill is disabled or if the host is unavailable. | 173 // Returns false if Autofill is disabled or if the host is unavailable. |
168 bool GetHost(const std::vector<AutofillProfile*>& profiles, | 174 bool GetHost(const std::vector<AutofillProfile*>& profiles, |
169 const std::vector<CreditCard*>& credit_cards, | 175 const std::vector<CreditCard*>& credit_cards, |
170 RenderViewHost** host) const WARN_UNUSED_RESULT; | 176 RenderViewHost** host) const WARN_UNUSED_RESULT; |
171 | 177 |
172 // Unpacks |unique_id| and fills |profile| or |credit_card| with the | 178 // Unpacks |unique_id| and fills |profile| or |credit_card| with the |
173 // appropriate data source. Returns false if the unpacked id cannot be found. | 179 // appropriate data source. Returns false if the unpacked id cannot be found. |
174 bool GetProfileOrCreditCard(int unique_id, | 180 bool GetProfileOrCreditCard(int unique_id, |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 TestTabContentsWithExternalDelegate); | 336 TestTabContentsWithExternalDelegate); |
331 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 337 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
332 UserHappinessFormLoadAndSubmission); | 338 UserHappinessFormLoadAndSubmission); |
333 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 339 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
334 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); | 340 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); |
335 | 341 |
336 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 342 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
337 }; | 343 }; |
338 | 344 |
339 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 345 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |