Commit 36c6429f authored by Yi Su's avatar Yi Su Committed by Commit Bot

Remove useless parameters in FindBarControllerIOS.

Remove some redundant parameters of
FindBarControllerIOS::addFindBarViewToParentView:usingToolbarView:selectText:animated.

Bug: 879136
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I47dbefdfbadcd160f3466a39ea6b75d90c2e8c78
Reviewed-on: https://chromium-review.googlesource.com/1254722
Commit-Queue: Yi Su <mrsuyi@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595812}
parent 8ae20888
...@@ -2679,21 +2679,9 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint { ...@@ -2679,21 +2679,9 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
selectText:(BOOL)selectText selectText:(BOOL)selectText
shouldFocus:(BOOL)shouldFocus { shouldFocus:(BOOL)shouldFocus {
DCHECK(_findBarController); DCHECK(_findBarController);
CGRect referenceFrame = CGRectZero;
if ([self canShowTabStrip]) {
DCHECK(_model.currentTab);
referenceFrame = [self visibleFrameForTab:_model.currentTab];
} else {
referenceFrame = self.contentArea.frame;
}
CGRect omniboxFrame =
[NamedGuide guideWithName:kOmniboxGuide view:self.view].layoutFrame;
[_findBarController [_findBarController
addFindBarViewToParentView:self.view addFindBarViewToParentView:self.view
usingToolbarView:_primaryToolbarCoordinator.viewController.view usingToolbarView:_primaryToolbarCoordinator.viewController.view
alignWithFrame:omniboxFrame
frame:referenceFrame
selectText:selectText selectText:selectText
animated:animate]; animated:animate];
[self updateFindBar:YES shouldFocus:shouldFocus]; [self updateFindBar:YES shouldFocus:shouldFocus];
......
...@@ -35,17 +35,12 @@ extern NSString* const kFindInPageContainerViewId; ...@@ -35,17 +35,12 @@ extern NSString* const kFindInPageContainerViewId;
// Updates the results count in Find Bar. // Updates the results count in Find Bar.
- (void)updateResultsCount:(FindInPageModel*)model; - (void)updateResultsCount:(FindInPageModel*)model;
// Display find bar view. For legacy UI on iPad, it makes best effort to // Display find bar view. For regular size, the find bar aligns with the right
// horizontally align find bar with alignment frame, unless alignment frame is // border of |parentView| and below |toolbarView|. For compact size, the find
// too wide or too narrow. When too wide, the find bar is shorter and // bar overlaps the |toolbarView|. If |selectText| flag is YES, the text in the
// right-aligned. When |alignmentFrame| is too narrow, the find bar will // text input field will be selected.
// horizontally fill |parentView|. For new UI on iPad, the find bar aligns with
// the right border of |parentView| and below |toolbarView|. If |selectText|
// flag is YES, the text in the text input field will be selected.
- (void)addFindBarViewToParentView:(UIView*)parentView - (void)addFindBarViewToParentView:(UIView*)parentView
usingToolbarView:(UIView*)toolbarView usingToolbarView:(UIView*)toolbarView
alignWithFrame:(CGRect)alignmentFrame
frame:(CGRect)findBarFrame
selectText:(BOOL)selectText selectText:(BOOL)selectText
animated:(BOOL)animated; animated:(BOOL)animated;
// Hide find bar view. // Hide find bar view.
......
...@@ -112,8 +112,6 @@ const NSTimeInterval kSearchShortDelay = 0.100; ...@@ -112,8 +112,6 @@ const NSTimeInterval kSearchShortDelay = 0.100;
#pragma mark View Setup & Teardown #pragma mark View Setup & Teardown
// TODO(crbug.com/879136): Remove code of legacy view and unnecessary args once
// UIRefreshPhase1 is 100% enabled.
- (UIView*)constructFindBarView { - (UIView*)constructFindBarView {
UIView* findBarBackground = nil; UIView* findBarBackground = nil;
...@@ -234,12 +232,8 @@ const NSTimeInterval kSearchShortDelay = 0.100; ...@@ -234,12 +232,8 @@ const NSTimeInterval kSearchShortDelay = 0.100;
self.findBarView.previousButton.enabled = enabled; self.findBarView.previousButton.enabled = enabled;
} }
// TODO(crbug.com/879136): Remove code of legacy view and unnecessary args once
// UIRefreshPhase1 is 100% enabled.
- (void)addFindBarViewToParentView:(UIView*)parentView - (void)addFindBarViewToParentView:(UIView*)parentView
usingToolbarView:(UIView*)toolbarView usingToolbarView:(UIView*)toolbarView
alignWithFrame:(CGRect)alignmentFrame
frame:(CGRect)findBarFrame
selectText:(BOOL)selectText selectText:(BOOL)selectText
animated:(BOOL)animated { animated:(BOOL)animated {
// If already showing find bar, update the height constraint only for iOS 10 // If already showing find bar, update the height constraint only for iOS 10
......
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