summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/autofill/form_input_accessory_view.h
blob: 25c0ab449433a57772ba043f76dc9d31c8218663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// 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_H_
#define IOS_CHROME_BROWSER_AUTOFILL_FORM_INPUT_ACCESSORY_VIEW_H_

#import <UIKit/UIKit.h>

@protocol FormInputAccessoryViewDelegate;

// Subview of the accessory view for web forms. Shows a custom view with form
// navigation controls above the keyboard. Subclassed to enable input clicks by
// way of the playInputClick method.
@interface FormInputAccessoryView : UIView<UIInputViewAudioFeedback>

// Initializes with |frame| and |delegate| to show |customView|. If the size of
// |rightFrame| is non-zero, the view will have two parts: the left one has
// frame |leftFrame| and the right one has frame |rightFrame|. Otherwise the
// view will be shown in |leftFrame|.
- (instancetype)initWithFrame:(CGRect)frame
                     delegate:(id<FormInputAccessoryViewDelegate>)delegate
                   customView:(UIView*)customView
                    leftFrame:(CGRect)leftFrame
                   rightFrame:(CGRect)rightFrame;

// Initializes with |frame| to show |customView|. Navigation controls are not
// shown.
- (instancetype)initWithFrame:(CGRect)frame customView:(UIView*)customView;
@end

#endif  // IOS_CHROME_BROWSER_AUTOFILL_FORM_INPUT_ACCESSORY_VIEW_H_