Index: chrome/browser/ui/search/instant_tab.cc |
diff --git a/chrome/browser/ui/search/instant_page.cc b/chrome/browser/ui/search/instant_tab.cc |
similarity index 75% |
rename from chrome/browser/ui/search/instant_page.cc |
rename to chrome/browser/ui/search/instant_tab.cc |
index cf48b861be5063c0fe23589297511dcdf48f618e..dea3f31c2427ca2e8dfff6ea8d108473bd6e264e 100644 |
--- a/chrome/browser/ui/search/instant_page.cc |
+++ b/chrome/browser/ui/search/instant_tab.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/ui/search/instant_page.h" |
+#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" |
@@ -10,31 +10,31 @@ |
#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/web_contents.h" |
-InstantPage::Delegate::~Delegate() { |
+InstantTab::Delegate::~Delegate() { |
} |
-InstantPage::~InstantPage() { |
+InstantTab::~InstantTab() { |
if (web_contents()) { |
SearchTabHelper::FromWebContents(web_contents())->model()->RemoveObserver( |
this); |
} |
} |
-bool InstantPage::supports_instant() const { |
+bool InstantTab::supports_instant() const { |
return web_contents() && |
SearchTabHelper::FromWebContents(web_contents())->SupportsInstant(); |
} |
-bool InstantPage::IsLocal() const { |
+bool InstantTab::IsLocal() const { |
return web_contents() && |
web_contents()->GetURL() == GURL(chrome::kChromeSearchLocalNtpUrl); |
} |
-InstantPage::InstantPage(Delegate* delegate) |
+InstantTab::InstantTab(Delegate* delegate) |
: delegate_(delegate) { |
} |
-void InstantPage::Init(content::WebContents* new_web_contents) { |
+void InstantTab::Init(content::WebContents* new_web_contents) { |
ClearContents(); |
if (!new_web_contents) |
@@ -50,22 +50,22 @@ void InstantPage::Init(content::WebContents* new_web_contents) { |
InstantSupportDetermined(model->instant_support() == INSTANT_SUPPORT_YES); |
} |
-void InstantPage::DidCommitProvisionalLoadForFrame( |
+void InstantTab::DidCommitProvisionalLoadForFrame( |
content::RenderFrameHost* render_frame_host, |
const GURL& url, |
ui::PageTransition /* transition_type */) { |
if (!render_frame_host->GetParent()) { |
- delegate_->InstantPageAboutToNavigateMainFrame(web_contents(), url); |
+ delegate_->InstantTabAboutToNavigateMainFrame(web_contents(), url); |
} |
} |
-void InstantPage::ModelChanged(const SearchModel::State& old_state, |
+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 InstantPage::InstantSupportDetermined(bool supports_instant) { |
+void InstantTab::InstantSupportDetermined(bool supports_instant) { |
delegate_->InstantSupportDetermined(web_contents(), supports_instant); |
// If the page doesn't support Instant, stop listening to it. |
@@ -73,7 +73,7 @@ void InstantPage::InstantSupportDetermined(bool supports_instant) { |
ClearContents(); |
} |
-void InstantPage::ClearContents() { |
+void InstantTab::ClearContents() { |
if (web_contents()) { |
SearchTabHelper::FromWebContents(web_contents())->model()->RemoveObserver( |
this); |