Commit b5f825b9 authored by mrefaat's avatar mrefaat Committed by Commit Bot

[IOSTabRefactoring] Remove navigationManagerImpl from tab & private_tab

Use webstateImpl method for tests instead.
Also remove tab_private includes where it's no longer used

Bug: 620465, 898381
Change-Id: I0db31eecf93eef1f8e88aa4428f16f25ff3a03b7
Reviewed-on: https://chromium-review.googlesource.com/c/1298243Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602426}
parent 2de24b99
......@@ -488,12 +488,6 @@ NSString* const kTabUrlKey = @"url";
return _parentTabModel;
}
// TODO(crbug.com/620465): this require the Tab's WebState to be a WebStateImpl,
// remove this helper once this is no longer true (and fix the unit tests).
- (web::NavigationManagerImpl*)navigationManagerImpl {
return static_cast<web::NavigationManagerImpl*>(self.navigationManager);
}
// TODO(crbug.com/620465): this require the Tab's WebState to be a WebStateImpl,
// remove this helper once this is no longer true (and fix the unit tests).
- (CRWWebController*)webController {
......
......@@ -7,10 +7,6 @@
#include "ios/net/request_tracker.h"
namespace web {
class NavigationManagerImpl;
}
@class CRWWebController;
// Exposed private methods for testing purpose.
......@@ -25,12 +21,6 @@ class NavigationManagerImpl;
// Returns the Tab owning TabModel.
- (TabModel*)parentTabModel;
// Variant of -navigationManager that returns the NavigationManager as a
// NavigationManagerImpl. This should only be used by tests and will be
// removed when Tab can wrap TestWebState (see issue crbug.com/620465 for
// progress).
- (web::NavigationManagerImpl*)navigationManagerImpl;
// The CRWWebController from the Tab's WebState. This should only be used
// by tests and will be removed when Tab can wrap TestWebState (see issue
// crbug.com/620465 for progress).
......
......@@ -241,7 +241,7 @@ class TabTest : public BlockCleanupTest,
web_state_impl_->OnNavigationStarted(&context1);
web::Referrer empty_referrer;
[tab_ navigationManagerImpl]->AddPendingItem(
web_state_impl_->GetNavigationManagerImpl().AddPendingItem(
redirect_url, empty_referrer, ui::PAGE_TRANSITION_CLIENT_REDIRECT,
web::NavigationInitiationType::RENDERER_INITIATED,
web::NavigationManager::UserAgentOverrideOption::INHERIT);
......@@ -254,7 +254,7 @@ class TabTest : public BlockCleanupTest,
[fake_wk_list_
setCurrentURL:base::SysUTF8ToNSString(redirect_url.spec())];
}
[tab_ navigationManagerImpl]->CommitPendingItem();
web_state_impl_->GetNavigationManagerImpl().CommitPendingItem();
context2.SetHasCommitted(true);
web_state_impl_->UpdateHttpResponseHeaders(redirect_url);
......
......@@ -28,7 +28,6 @@
#import "ios/chrome/browser/tabs/tab_helper_util.h"
#import "ios/chrome/browser/tabs/tab_model.h"
#import "ios/chrome/browser/tabs/tab_model_observer.h"
#import "ios/chrome/browser/tabs/tab_private.h"
#import "ios/chrome/browser/ui/activity_services/share_protocol.h"
#import "ios/chrome/browser/ui/activity_services/share_to_data.h"
#import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h"
......
......@@ -17,7 +17,6 @@
#import "ios/chrome/browser/snapshots/snapshot_tab_helper.h"
#import "ios/chrome/browser/tabs/tab.h"
#import "ios/chrome/browser/tabs/tab_model_observer.h"
#import "ios/chrome/browser/tabs/tab_private.h"
#import "ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_controller_factory.h"
#import "ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.h"
......
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