Commit a9574fb4 authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

Shuffle and group methods in OmniboxTextfieldIOS.

Groups textfield methods so that overrides are together and are marked.

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: If47169cccf774f51b86776e3084ba99283808d30
Bug: 788636
Reviewed-on: https://chromium-review.googlesource.com/758850
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520983}
parent cacf182e
...@@ -28,10 +28,6 @@ typedef enum { ...@@ -28,10 +28,6 @@ typedef enum {
- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
// Delegate getter and setter. Overridden to use OmniboxTextFieldDelegate
// instead of UITextFieldDelegate.
- (id<OmniboxTextFieldDelegate>)delegate;
- (void)setDelegate:(id<OmniboxTextFieldDelegate>)delegate;
// Sets the field's text to |text|. If |userTextLength| is less than the length // Sets the field's text to |text|. If |userTextLength| is less than the length
// of |text|, the excess is displayed as inline autocompleted text. When the // of |text|, the excess is displayed as inline autocompleted text. When the
...@@ -64,15 +60,6 @@ typedef enum { ...@@ -64,15 +60,6 @@ typedef enum {
// on older version of iOS. // on older version of iOS.
- (NSString*)markedText; - (NSString*)markedText;
// Initial touch on the Omnibox triggers a "pre-edit" state. The current
// URL is shown without any insertion point. First character typed replaces
// the URL. A second touch turns on the insertion point. |preEditStaticLabel|
// is normally hidden. In pre-edit state, |preEditStaticLabel| is unhidden
// and displays the URL that will be edited on the second touch.
- (void)enterPreEditState;
- (void)exitPreEditState;
- (BOOL)isPreEditing;
// Returns the current selected text range as an NSRange. // Returns the current selected text range as an NSRange.
- (NSRange)selectedNSRange; - (NSRange)selectedNSRange;
...@@ -93,21 +80,34 @@ typedef enum { ...@@ -93,21 +80,34 @@ typedef enum {
// Called when animations added by |-animateFadeWithStyle:| can be removed. // Called when animations added by |-animateFadeWithStyle:| can be removed.
- (void)cleanUpFadeAnimations; - (void)cleanUpFadeAnimations;
// Redeclare the delegate property to be the more specific // New animations API. Currently are behind a flag since they require iOS 10
// OmniboxTextFieldDelegate. // APIs to work. They replace all animations above.
- (void)addExpandOmniboxAnimations:(UIViewPropertyAnimator*)animator
API_AVAILABLE(ios(10.0));
- (void)addContractOmniboxAnimations:(UIViewPropertyAnimator*)animator
API_AVAILABLE(ios(10.0));
// Initial touch on the Omnibox triggers a "pre-edit" state. The current
// URL is shown without any insertion point. First character typed replaces
// the URL. A second touch turns on the insertion point. |preEditStaticLabel|
// is normally hidden. In pre-edit state, |preEditStaticLabel| is unhidden
// and displays the URL that will be edited on the second touch.
- (void)enterPreEditState;
- (void)exitPreEditState;
- (BOOL)isPreEditing;
// The delegate for this textfield. Overridden to use OmniboxTextFieldDelegate
// instead of UITextFieldDelegate.
@property(nonatomic, weak) id<OmniboxTextFieldDelegate> delegate; @property(nonatomic, weak) id<OmniboxTextFieldDelegate> delegate;
// Text displayed when in pre-edit state.
@property(nonatomic, strong) NSString* preEditText; @property(nonatomic, strong) NSString* preEditText;
@property(nonatomic) BOOL clearingPreEditText; @property(nonatomic) BOOL clearingPreEditText;
@property(nonatomic, strong) UIColor* selectedTextBackgroundColor; @property(nonatomic, strong) UIColor* selectedTextBackgroundColor;
@property(nonatomic, strong) UIColor* placeholderTextColor; @property(nonatomic, strong) UIColor* placeholderTextColor;
@property(nonatomic, assign) BOOL incognito; @property(nonatomic, assign) BOOL incognito;
- (void)addExpandOmniboxAnimations:(UIViewPropertyAnimator*)animator
API_AVAILABLE(ios(10.0));
- (void)addContractOmniboxAnimations:(UIViewPropertyAnimator*)animator
API_AVAILABLE(ios(10.0));
@end @end
// A category for defining new methods that access private ivars. // A category for defining new methods that access private ivars.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment