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