OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 // form, requests them, and updates the view accordingly. | 39 // form, requests them, and updates the view accordingly. |
40 - (void)retrieveSuggestionsForFormNamed:(const std::string&)formName | 40 - (void)retrieveSuggestionsForFormNamed:(const std::string&)formName |
41 fieldName:(const std::string&)fieldName | 41 fieldName:(const std::string&)fieldName |
42 type:(const std::string&)type | 42 type:(const std::string&)type |
43 webState:(web::WebState*)webState; | 43 webState:(web::WebState*)webState; |
44 | 44 |
45 // Instructs the controller to detach itself from the WebState. | 45 // Instructs the controller to detach itself from the WebState. |
46 - (void)detachFromWebState; | 46 - (void)detachFromWebState; |
47 | 47 |
48 // Provides an input accessory view for form suggestions. | 48 // Provides an input accessory view for form suggestions. |
49 @property(nonatomic, readonly) | 49 @property(nonatomic, readonly) id<FormInputAccessoryViewProvider> |
50 id<FormInputAccessoryViewProvider> accessoryViewProvider; | 50 accessoryViewProvider; |
51 | 51 |
52 @end | 52 @end |
53 | 53 |
54 @interface FormSuggestionController (ForTesting) | 54 @interface FormSuggestionController (ForTesting) |
55 | 55 |
56 // Initializes a new controller in the same way as the public initializer, but | 56 // Initializes a new controller in the same way as the public initializer, but |
57 // supports specifying a JsSuggestionManager for testing. | 57 // supports specifying a JsSuggestionManager for testing. |
58 - (instancetype)initWithWebState:(web::WebState*)webState | 58 - (instancetype)initWithWebState:(web::WebState*)webState |
59 providers:(NSArray*)providers | 59 providers:(NSArray*)providers |
60 JsSuggestionManager:(JsSuggestionManager*)jsSuggestionManager; | 60 JsSuggestionManager:(JsSuggestionManager*)jsSuggestionManager; |
61 | 61 |
62 // Overrides the web view proxy. | 62 // Overrides the web view proxy. |
63 - (void)setWebViewProxy:(id<CRWWebViewProxy>)webViewProxy; | 63 - (void)setWebViewProxy:(id<CRWWebViewProxy>)webViewProxy; |
64 | 64 |
65 // Invoked when an attempt to retrieve suggestions yields no results. | 65 // Invoked when an attempt to retrieve suggestions yields no results. |
66 - (void)onNoSuggestionsAvailable; | 66 - (void)onNoSuggestionsAvailable; |
67 | 67 |
68 @end | 68 @end |
69 | 69 |
70 #endif // IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_CONTROLLER_H_ | 70 #endif // IOS_CHROME_BROWSER_AUTOFILL_FORM_SUGGESTION_CONTROLLER_H_ |
OLD | NEW |