Commit 3eea2e46 authored by mrefaat's avatar mrefaat Committed by Commit Bot

Remove isVoiceSearchResultsTab from tab

This was created for voicesearch bar which is removed with the new UI.

Bug: 898697, 778416
Change-Id: Ice43ef892a886bf616f8bc2712c0a6b2d48b29f8
Reviewed-on: https://chromium-review.googlesource.com/c/1353936Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611914}
parent 5dbfc14f
...@@ -91,9 +91,6 @@ extern NSString* const kProxyPassthroughHeaderValue; ...@@ -91,9 +91,6 @@ extern NSString* const kProxyPassthroughHeaderValue;
// Delegate used to show HTTP Authentication dialogs. // Delegate used to show HTTP Authentication dialogs.
@property(nonatomic, weak) id<TabDialogDelegate> dialogDelegate; @property(nonatomic, weak) id<TabDialogDelegate> dialogDelegate;
// Whether this tab is displaying a voice search result.
@property(nonatomic, readonly) BOOL isVoiceSearchResultsTab;
// |YES| if the tab has finished loading. // |YES| if the tab has finished loading.
@property(nonatomic, readonly) BOOL loadFinished; @property(nonatomic, readonly) BOOL loadFinished;
......
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
#import "ios/chrome/browser/ui/open_in_controller.h" #import "ios/chrome/browser/ui/open_in_controller.h"
#import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h" #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h"
#include "ios/chrome/browser/ui/util/ui_util.h" #include "ios/chrome/browser/ui/util/ui_util.h"
#import "ios/chrome/browser/voice/voice_search_navigations_tab_helper.h"
#import "ios/chrome/browser/web/page_placeholder_tab_helper.h" #import "ios/chrome/browser/web/page_placeholder_tab_helper.h"
#import "ios/chrome/browser/web/tab_id_tab_helper.h" #import "ios/chrome/browser/web/tab_id_tab_helper.h"
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
...@@ -237,23 +236,6 @@ NSString* const kTabUrlKey = @"url"; ...@@ -237,23 +236,6 @@ NSString* const kTabUrlKey = @"url";
overscrollActionsControllerDelegate_ = overscrollActionsControllerDelegate; overscrollActionsControllerDelegate_ = overscrollActionsControllerDelegate;
} }
- (BOOL)isVoiceSearchResultsTab {
// TODO(crbug.com/778416): Move this logic entirely into helper.
// If nothing has been loaded in the Tab, it cannot be displaying a voice
// search results page.
web::NavigationItem* item =
self.webState->GetNavigationManager()->GetVisibleItem();
if (!item)
return NO;
// Navigating through history to a NavigationItem that was created for a voice
// search query should just be treated like a normal page load.
if ((item->GetTransitionType() & ui::PAGE_TRANSITION_FORWARD_BACK) != 0)
return NO;
// Check whether |item| has been marked as a voice search result navigation.
return VoiceSearchNavigationTabHelper::FromWebState(self.webState)
->IsNavigationFromVoiceSearch(item);
}
- (BOOL)loadFinished { - (BOOL)loadFinished {
return self.webState && !self.webState->IsLoading(); return self.webState && !self.webState->IsLoading();
} }
......
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