crw_input_view_provider.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2020 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. #ifndef IOS_WEB_COMMON_CRW_INPUT_VIEW_PROVIDER_H_
  5. #define IOS_WEB_COMMON_CRW_INPUT_VIEW_PROVIDER_H_
  6. #import <UIKit/UIKit.h>
  7. // Subset of UIResponder's APIs. Includes APIs related to inputView and
  8. // inputAccessoryView.
  9. @protocol CRWResponderInputView <NSObject>
  10. @optional
  11. // APIs to show custom input views. These mimic the ones in UIResponder. Refer
  12. // to Apple's documentation for more information.
  13. - (UIView*)inputView;
  14. - (UIInputViewController*)inputViewController;
  15. - (UIView*)inputAccessoryView;
  16. - (UIInputViewController*)inputAccessoryViewController;
  17. @end
  18. // Any object that adopts this protocol can provide an id<CRWResponderInputView>
  19. // to show custom input views.
  20. @protocol CRWInputViewProvider <NSObject>
  21. // The actual object implementing the input view methods.
  22. @property(nonatomic, readonly) id<CRWResponderInputView> responderInputView;
  23. @end
  24. #endif // IOS_WEB_COMMON_CRW_INPUT_VIEW_PROVIDER_H_