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

Side by Side Diff: components/autofill/ios/browser/js_autofill_manager.h

Issue 1248463002: Eliminate the use of autofill::REQUIRE_AUTOCOMPLETE [step 3 of 3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_
7 7
8 #include "base/ios/block_types.h" 8 #include "base/ios/block_types.h"
9 #include "components/autofill/core/common/autofill_constants.h" 9 #include "components/autofill/core/common/autofill_constants.h"
10 #import "ios/web/public/web_state/js/crw_js_injection_manager.h" 10 #import "ios/web/public/web_state/js/crw_js_injection_manager.h"
11 11
12 @class CRWJSInjectionReceiver; 12 @class CRWJSInjectionReceiver;
13 13
14 // Loads the JavaScript file, autofill_controller.js, which contains form 14 // Loads the JavaScript file, autofill_controller.js, which contains form
15 // parsing and autofill functions. 15 // parsing and autofill functions.
16 @interface JsAutofillManager : CRWJSInjectionManager 16 @interface JsAutofillManager : CRWJSInjectionManager
17 17
18 // Extracts forms from a web page. Only forms with at least |requiredFields| 18 // Extracts forms from a web page. Only forms with at least |requiredFields|
19 // fields are extracted. 19 // fields are extracted.
20 // |completionHandler| is called with the JSON string of forms of a web page. 20 // |completionHandler| is called with the JSON string of forms of a web page.
21 // |completionHandler| cannot be nil. 21 // |completionHandler| cannot be nil.
22 - (void)fetchFormsWithMinimumRequiredFieldsCount:(NSUInteger)requiredFieldsCount 22 - (void)fetchFormsWithMinimumRequiredFieldsCount:(NSUInteger)requiredFieldsCount
23 completionHandler: 23 completionHandler:
24 (void (^)(NSString*))completionHandler; 24 (void (^)(NSString*))completionHandler;
25 25
26 // TODO(jdonnelly): Remove this as soon as the downstream code stops using it.
27 // Extracts forms from a web page. Only forms with at least |requiredFields|
28 // fields and the appropriate attribute requirements are extracted.
29 // |completionHandler| is called with the JSON string of forms of a web page.
30 // |completionHandler| cannot be nil.
31 - (void)fetchFormsWithRequirements:(autofill::RequirementsMask)requirements
32 minimumRequiredFieldsCount:(NSUInteger)requiredFieldsCount
33 completionHandler:(void (^)(NSString*))completionHandler;
34
35 // Stores the current active element. This is used to make the element active 26 // Stores the current active element. This is used to make the element active
36 // again in case the web view loses focus when a dialog is presented over it. 27 // again in case the web view loses focus when a dialog is presented over it.
37 - (void)storeActiveElement; 28 - (void)storeActiveElement;
38 29
39 // Clears the current active element. 30 // Clears the current active element.
40 - (void)clearActiveElement; 31 - (void)clearActiveElement;
41 32
42 // Fills the data in JSON string |dataString| into the active form field, then 33 // Fills the data in JSON string |dataString| into the active form field, then
43 // executes the |completionHandler|. The active form field is either 34 // executes the |completionHandler|. The active form field is either
44 // document.activeElement or the field stored by a call to storeActiveElement. 35 // document.activeElement or the field stored by a call to storeActiveElement.
(...skipping 18 matching lines...) Expand all
63 // |formName|, supplying the given reason. 54 // |formName|, supplying the given reason.
64 - (void)dispatchAutocompleteErrorEvent:(NSString*)formName 55 - (void)dispatchAutocompleteErrorEvent:(NSString*)formName
65 withReason:(NSString*)reason; 56 withReason:(NSString*)reason;
66 57
67 // Marks up the form with autofill field prediction data (diagnostic tool). 58 // Marks up the form with autofill field prediction data (diagnostic tool).
68 - (void)fillPredictionData:(NSString*)dataString; 59 - (void)fillPredictionData:(NSString*)dataString;
69 60
70 @end 61 @end
71 62
72 #endif // COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_ 63 #endif // COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_constants.h ('k') | components/autofill/ios/browser/js_autofill_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698