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 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 10 matching lines...) Expand all Loading... | |
21 #include "base/string16.h" | 21 #include "base/string16.h" |
22 #include "base/time.h" | 22 #include "base/time.h" |
23 #include "chrome/browser/api/sync/profile_sync_service_observer.h" | 23 #include "chrome/browser/api/sync/profile_sync_service_observer.h" |
24 #include "chrome/browser/autofill/autocomplete_history_manager.h" | 24 #include "chrome/browser/autofill/autocomplete_history_manager.h" |
25 #include "chrome/browser/autofill/autofill_download.h" | 25 #include "chrome/browser/autofill/autofill_download.h" |
26 #include "chrome/browser/autofill/field_types.h" | 26 #include "chrome/browser/autofill/field_types.h" |
27 #include "chrome/browser/autofill/form_structure.h" | 27 #include "chrome/browser/autofill/form_structure.h" |
28 #include "chrome/browser/autofill/personal_data_manager.h" | 28 #include "chrome/browser/autofill/personal_data_manager.h" |
29 #include "content/public/browser/web_contents_observer.h" | 29 #include "content/public/browser/web_contents_observer.h" |
30 #include "content/public/common/ssl_status.h" | 30 #include "content/public/common/ssl_status.h" |
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" | |
31 | 32 |
32 class AutofillExternalDelegate; | 33 class AutofillExternalDelegate; |
33 class AutofillField; | 34 class AutofillField; |
34 class AutofillProfile; | 35 class AutofillProfile; |
35 class AutofillMetrics; | 36 class AutofillMetrics; |
36 class CreditCard; | 37 class CreditCard; |
37 class FormGroup; | 38 class FormGroup; |
38 class GURL; | 39 class GURL; |
39 class PrefServiceSyncable; | 40 class PrefServiceSyncable; |
40 class ProfileSyncService; | 41 class ProfileSyncService; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 AutofillExternalDelegate* external_delegate() { | 164 AutofillExternalDelegate* external_delegate() { |
164 return external_delegate_; | 165 return external_delegate_; |
165 } | 166 } |
166 | 167 |
167 // Processes the submitted |form|, saving any new Autofill data and uploading | 168 // Processes the submitted |form|, saving any new Autofill data and uploading |
168 // the possible field types for the submitted fields to the crowdsouring | 169 // the possible field types for the submitted fields to the crowdsouring |
169 // server. Returns false if this form is not relevant for Autofill. | 170 // server. Returns false if this form is not relevant for Autofill. |
170 bool OnFormSubmitted(const FormData& form, | 171 bool OnFormSubmitted(const FormData& form, |
171 const base::TimeTicks& timestamp); | 172 const base::TimeTicks& timestamp); |
172 | 173 |
173 // Tell the renderer the current interactive autocomplete failed somehow. | 174 // Tell the renderer the current interactive autocomplete finished. |
174 // Exposed for testing. | 175 virtual void ReturnAutocompleteResult( |
175 virtual void ReturnAutocompleteError(); | 176 WebKit::WebFormElement::AutocompleteResult result, |
177 const FormData& form_data); | |
Ilya Sherman
2013/01/09 08:54:39
Hmm, why not pass an error with a reason, or a suc
Dan Beam
2013/01/09 18:37:38
Because I didn't like that I ended up with am erro
| |
176 | 178 |
177 private: | 179 private: |
178 // content::WebContentsObserver: | 180 // content::WebContentsObserver: |
179 virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; | 181 virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; |
180 virtual void DidNavigateMainFrame( | 182 virtual void DidNavigateMainFrame( |
181 const content::LoadCommittedDetails& details, | 183 const content::LoadCommittedDetails& details, |
182 const content::FrameNavigateParams& params) OVERRIDE; | 184 const content::FrameNavigateParams& params) OVERRIDE; |
183 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 185 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
184 virtual void WebContentsDestroyed( | 186 virtual void WebContentsDestroyed( |
185 content::WebContents* web_contents) OVERRIDE; | 187 content::WebContents* web_contents) OVERRIDE; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
393 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 395 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
394 TestTabContentsWithExternalDelegate); | 396 TestTabContentsWithExternalDelegate); |
395 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 397 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
396 UserHappinessFormLoadAndSubmission); | 398 UserHappinessFormLoadAndSubmission); |
397 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 399 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
398 | 400 |
399 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 401 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
400 }; | 402 }; |
401 | 403 |
402 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 404 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |