| Index: chrome/browser/ui/search/instant_tab.cc
|
| diff --git a/chrome/browser/ui/search/instant_tab.cc b/chrome/browser/ui/search/instant_tab.cc
|
| index dea3f31c2427ca2e8dfff6ea8d108473bd6e264e..b945a58b2bc518368f9c546351984ad4f8e3eb9f 100644
|
| --- a/chrome/browser/ui/search/instant_tab.cc
|
| +++ b/chrome/browser/ui/search/instant_tab.cc
|
| @@ -20,27 +20,12 @@ InstantTab::~InstantTab() {
|
| }
|
| }
|
|
|
| -bool InstantTab::supports_instant() const {
|
| - return web_contents() &&
|
| - SearchTabHelper::FromWebContents(web_contents())->SupportsInstant();
|
| -}
|
| -
|
| -bool InstantTab::IsLocal() const {
|
| - return web_contents() &&
|
| - web_contents()->GetURL() == GURL(chrome::kChromeSearchLocalNtpUrl);
|
| -}
|
| -
|
| -InstantTab::InstantTab(Delegate* delegate)
|
| +InstantTab::InstantTab(Delegate* delegate, content::WebContents* contents)
|
| : delegate_(delegate) {
|
| -}
|
| -
|
| -void InstantTab::Init(content::WebContents* new_web_contents) {
|
| - ClearContents();
|
| -
|
| - if (!new_web_contents)
|
| + if (!contents)
|
| return;
|
|
|
| - Observe(new_web_contents);
|
| + Observe(contents);
|
| SearchModel* model =
|
| SearchTabHelper::FromWebContents(web_contents())->model();
|
| model->AddObserver(this);
|
| @@ -60,7 +45,7 @@ void InstantTab::DidCommitProvisionalLoadForFrame(
|
| }
|
|
|
| void InstantTab::ModelChanged(const SearchModel::State& old_state,
|
| - const SearchModel::State& new_state) {
|
| + const SearchModel::State& new_state) {
|
| if (old_state.instant_support != new_state.instant_support)
|
| InstantSupportDetermined(new_state.instant_support == INSTANT_SUPPORT_YES);
|
| }
|
| @@ -79,5 +64,5 @@ void InstantTab::ClearContents() {
|
| this);
|
| }
|
|
|
| - Observe(NULL);
|
| + Observe(nullptr);
|
| }
|
|
|