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 {
selectText:(BOOL)selectText
shouldFocus:(BOOL)shouldFocus {
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
addFindBarViewToParentView:self.view
usingToolbarView:_primaryToolbarCoordinator.viewController.view
alignWithFrame:omniboxFrame
frame:referenceFrame
selectText:selectText
animated:animate];
[self updateFindBar:YES shouldFocus:shouldFocus];
......
......@@ -35,17 +35,12 @@ extern NSString* const kFindInPageContainerViewId;
// Updates the results count in Find Bar.
- (void)updateResultsCount:(FindInPageModel*)model;
// Display find bar view. For legacy UI on iPad, it makes best effort to
// horizontally align find bar with alignment frame, unless alignment frame is
// too wide or too narrow. When too wide, the find bar is shorter and
// right-aligned. When |alignmentFrame| is too narrow, the find bar will
// 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.
// Display find bar view. For regular size, the find bar aligns with the right
// border of |parentView| and below |toolbarView|. For compact size, the find
// bar overlaps the |toolbarView|. If |selectText| flag is YES, the text in the
// text input field will be selected.
- (void)addFindBarViewToParentView:(UIView*)parentView
usingToolbarView:(UIView*)toolbarView
alignWithFrame:(CGRect)alignmentFrame
frame:(CGRect)findBarFrame
selectText:(BOOL)selectText
animated:(BOOL)animated;
// Hide find bar view.
......
......@@ -112,8 +112,6 @@ const NSTimeInterval kSearchShortDelay = 0.100;
#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* findBarBackground = nil;
......@@ -234,12 +232,8 @@ const NSTimeInterval kSearchShortDelay = 0.100;
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
usingToolbarView:(UIView*)toolbarView
alignWithFrame:(CGRect)alignmentFrame
frame:(CGRect)findBarFrame
selectText:(BOOL)selectText
animated:(BOOL)animated {
// 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