| 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 180d8952ae4e8bd94219d112823c75da01811e9c..7193a547e8f8b74eb04bbc99e08fb6ac96a18278 100644
|
| --- a/chrome/browser/ui/search/instant_tab.cc
|
| +++ b/chrome/browser/ui/search/instant_tab.cc
|
| @@ -4,11 +4,7 @@
|
|
|
| #include "chrome/browser/ui/search/instant_tab.h"
|
|
|
| -#include "chrome/browser/ui/search/search_model.h"
|
| -#include "chrome/browser/ui/search/search_tab_helper.h"
|
| -#include "chrome/common/url_constants.h"
|
| #include "content/public/browser/navigation_handle.h"
|
| -#include "content/public/browser/render_frame_host.h"
|
| #include "content/public/browser/web_contents.h"
|
|
|
| InstantTab::Delegate::~Delegate() {}
|
| @@ -16,12 +12,7 @@ InstantTab::Delegate::~Delegate() {}
|
| InstantTab::InstantTab(Delegate* delegate, content::WebContents* web_contents)
|
| : delegate_(delegate), pending_web_contents_(web_contents) {}
|
|
|
| -InstantTab::~InstantTab() {
|
| - if (web_contents()) {
|
| - SearchTabHelper::FromWebContents(web_contents())->model()->RemoveObserver(
|
| - this);
|
| - }
|
| -}
|
| +InstantTab::~InstantTab() {}
|
|
|
| void InstantTab::Init() {
|
| if (!pending_web_contents_)
|
| @@ -29,14 +20,6 @@ void InstantTab::Init() {
|
|
|
| Observe(pending_web_contents_);
|
| pending_web_contents_ = nullptr;
|
| -
|
| - SearchModel* model =
|
| - SearchTabHelper::FromWebContents(web_contents())->model();
|
| - model->AddObserver(this);
|
| -
|
| - // Already know whether the page supports instant.
|
| - if (model->instant_support() != INSTANT_SUPPORT_UNKNOWN)
|
| - InstantSupportDetermined(model->instant_support() == INSTANT_SUPPORT_YES);
|
| }
|
|
|
| void InstantTab::DidFinishNavigation(
|
| @@ -46,23 +29,3 @@ void InstantTab::DidFinishNavigation(
|
| web_contents(), navigation_handle->GetURL());
|
| }
|
| }
|
| -
|
| -void InstantTab::ModelChanged(const SearchModel::State& old_state,
|
| - const SearchModel::State& new_state) {
|
| - if (old_state.instant_support != new_state.instant_support)
|
| - InstantSupportDetermined(new_state.instant_support == INSTANT_SUPPORT_YES);
|
| -}
|
| -
|
| -void InstantTab::InstantSupportDetermined(bool supports_instant) {
|
| - delegate_->InstantSupportDetermined(web_contents(), supports_instant);
|
| -
|
| - // If the page doesn't support Instant, stop listening to it.
|
| - if (!supports_instant) {
|
| - if (web_contents()) {
|
| - SearchTabHelper::FromWebContents(web_contents())->model()->RemoveObserver(
|
| - this);
|
| - }
|
| -
|
| - Observe(nullptr);
|
| - }
|
| -}
|
|
|