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

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

Issue 1007813002: [iOS] Upstream autofill component code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added dconnelly to OWNERS Created 5 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_
7
8 #include "base/ios/block_types.h"
9 #include "components/autofill/core/common/autofill_constants.h"
10 #import "ios/web/public/web_state/js/crw_js_injection_manager.h"
11
12 @class CRWJSInjectionReceiver;
13
14 // Loads the JavaScript file, autofill_controller.js, which contains form
15 // parsing and autofill functions.
16 @interface JsAutofillManager : CRWJSInjectionManager
17
18 // Extracts forms from a web page. Only forms with at least |requiredFields|
19 // fields and the appropriate attribute requirements are extracted.
20 // |completionHandler| is called with the JSON string of forms of a web page.
21 // |completionHandler| cannot be nil.
22 - (void)fetchFormsWithRequirements:(autofill::RequirementsMask)requirements
23 minimumRequiredFieldsCount:(NSUInteger)requiredFieldsCount
24 completionHandler:(void (^)(NSString*))completionHandler;
25
26 // Fills the data in JSON string |dataString| into the active form field, then
27 // executes the |completionHandler|.
28 - (void)fillActiveFormField:(NSString*)dataString
29 completionHandler:(ProceduralBlock)completionHandler;
30
31 // Fills a number of fields in the same named form.
32 // |completionHandler| is called after the forms are filled. |completionHandler|
33 // cannot be nil.
34 - (void)fillForm:(NSString*)dataString
35 completionHandler:(ProceduralBlock)completionHandler;
36
37 // Dispatches the autocomplete event to the form element with the given
38 // |formName|.
39 - (void)dispatchAutocompleteEvent:(NSString*)formName;
40
41 // Dispatches the autocomplete error event to the form element with the given
42 // |formName|, supplying the given reason.
43 - (void)dispatchAutocompleteErrorEvent:(NSString*)formName
44 withReason:(NSString*)reason;
45
46 // Marks up the form with autofill field prediction data (diagnostic tool).
47 - (void)fillPredictionData:(NSString*)dataString;
48
49 @end
50
51 #endif // COMPONENTS_AUTOFILL_IOS_BROWSER_JS_AUTOFILL_MANAGER_H_
OLDNEW
« no previous file with comments | « components/autofill/ios/browser/form_suggestion.mm ('k') | components/autofill/ios/browser/js_autofill_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698