Skip to content

Commit

Permalink
Change ChromeBrowserProvider interface to Tab*/TabModel* instead of id.
Browse files Browse the repository at this point in the history
Since Tab*/TabModel* are upstream, introduce the correct overrides
that takes those types directly instead of converting to id.

This is the last step where the old overrides are removed as they
are no longer overloaded downstream.

BUG=None

Review-Url: https://codereview.chromium.org/2637883002
Cr-Commit-Position: refs/heads/master@{#444043}
  • Loading branch information
sdefresne authored and Commit bot committed Jan 17, 2017
1 parent efb9e6a commit 9956266
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions ios/chrome/browser/providers/chromium_browser_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class ChromiumBrowserProvider : public ios::ChromeBrowserProvider {
ios::ChromeIdentityService* GetChromeIdentityService() override;
UITextField<TextFieldStyling>* CreateStyledTextField(
CGRect frame) const override NS_RETURNS_RETAINED;
void InitializeCastService(id main_tab_model) const override;
void AttachTabHelpers(web::WebState* web_state, id tab) const override;
VoiceSearchProvider* GetVoiceSearchProvider() const override;
id<LogoVendor> CreateLogoVendor(ios::ChromeBrowserState* browser_state,
id<UrlLoader> loader) const override
Expand Down
5 changes: 0 additions & 5 deletions ios/chrome/browser/providers/chromium_browser_provider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
return [[ChromiumStyledTextField alloc] initWithFrame:CGRectZero];
}

void ChromiumBrowserProvider::InitializeCastService(id main_tab_model) const {}

void ChromiumBrowserProvider::AttachTabHelpers(web::WebState* web_state,
id tab) const {}

VoiceSearchProvider* ChromiumBrowserProvider::GetVoiceSearchProvider() const {
return voice_search_provider_.get();
}
Expand Down
6 changes: 0 additions & 6 deletions ios/public/provider/chrome/browser/chrome_browser_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,11 @@ class ChromeBrowserProvider {

// Initializes the cast service. Should be called soon after the given
// |main_tab_model| is created.
// TODO(rohitrao): Change from |id| to |TabModel*| once TabModel is moved into
// the Chromium tree.
virtual void InitializeCastService(id main_tab_model) const;
virtual void InitializeCastService(TabModel* main_tab_model) const;

// Attaches any embedder-specific tab helpers to the given |web_state|. The
// owning |tab| is included for helpers that need access to information that
// is not yet available through web::WebState.
// TODO(rohitrao): Change from |id| to |Tab*| once Tab is moved into the
// Chromium tree.
virtual void AttachTabHelpers(web::WebState* web_state, id tab) const;
virtual void AttachTabHelpers(web::WebState* web_state, Tab* tab) const;

// Returns whether safe browsing is enabled. See the comment on
Expand Down
9 changes: 0 additions & 9 deletions ios/public/provider/chrome/browser/chrome_browser_provider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,9 @@ void SetChromeBrowserProvider(ChromeBrowserProvider* provider) {
return nil;
}

void ChromeBrowserProvider::InitializeCastService(id main_tab_model) const {
NOTREACHED() << "Use InitializeCastService(TabModel* main_tab_model)";
}

void ChromeBrowserProvider::InitializeCastService(
TabModel* main_tab_model) const {}

void ChromeBrowserProvider::AttachTabHelpers(web::WebState* web_state,
id tab) const {
NOTREACHED() << "Use AttachTabHelpers(web::WebState* web_state, Tab* tab)";
}

void ChromeBrowserProvider::AttachTabHelpers(web::WebState* web_state,
Tab* tab) const {}

Expand Down

0 comments on commit 9956266

Please sign in to comment.