blob: 8d82d8db70617d51792241a28648c6510194fea9 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_AUTOFILL_FORM_INPUT_ACCESSORY_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_AUTOFILL_FORM_INPUT_ACCESSORY_VIEW_CONTROLLER_H_
#import <UIKit/UIKit.h>
#import "ios/chrome/browser/autofill/form_input_accessory_consumer.h"
namespace autofill {
extern CGFloat const kInputAccessoryHeight;
} // namespace autofill
@class ManualFillAccessoryViewController;
@protocol ManualFillAccessoryViewControllerDelegate;
// Creates and manages a custom input accessory view while the user is
// interacting with a form. Also handles hiding and showing the default
// accessory view elements. Defaults in paused state and needs to be started by
// calling |continueCustomKeyboardView|.
@interface FormInputAccessoryViewController
: NSObject<FormInputAccessoryConsumer>
// Presents a view above the keyboard.
- (void)presentView:(UIView*)view;
// Frees the manual fallback icons as the first option in the suggestions bar,
// and animates any suggestion back to their original position.
- (void)unlockManualFallbackView;
// Shows the manual fallback icons as the first option in the suggestions bar,
// and locks them in that position.
- (void)lockManualFallbackView;
// Tells the view to restore the manual fallback icons to a clean state. That
// means no icon selected.
- (void)resetManualFallbackIcons;
// Instances an object with the desired delegate.
//
// @param manualFillAccessoryViewControllerDelegate the delegate for the actions
// in the manual fallback icons.
// @return A fresh object with the passed delegate.
- (instancetype)initWithManualFillAccessoryViewControllerDelegate:
(id<ManualFillAccessoryViewControllerDelegate>)
manualFillAccessoryViewControllerDelegate;
// Unavailable
- (instancetype)init NS_UNAVAILABLE;
@end
#endif // IOS_CHROME_BROWSER_AUTOFILL_FORM_INPUT_ACCESSORY_VIEW_CONTROLLER_H_