Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 11364196: Remove TabContents from TabStripModelObserver::ActiveTabChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index b1252c558fbeca9178c8bcba57e132b317f2dd0e..1ad6c25b6b27792411ac6e05b15e8896b8ca0f24 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -28,12 +28,11 @@ namespace {
// Returns true iff the search model for |tab| is in an NTP state, that is, a
// state in which the Instant overlay may be showing custom NTP content in
// EXTENDED mode.
-bool IsSearchModelNTP(TabContents* tab) {
- if (!tab || !tab->web_contents())
+bool IsSearchModelNTP(content::WebContents* tab) {
+ if (!tab)
return false;
- content::WebContents* web_contents = tab->web_contents();
chrome::search::SearchModel* model =
- chrome::search::SearchTabHelper::FromWebContents(web_contents)->model();
+ chrome::search::SearchTabHelper::FromWebContents(tab)->model();
return model && model->mode().is_ntp();
}
@@ -134,8 +133,8 @@ void BrowserInstantController::OnPreferenceChanged(
// BrowserInstantController, TabStripModelObserver implementation:
void BrowserInstantController::ActiveTabChanged(
- TabContents* old_contents,
- TabContents* new_contents,
+ content::WebContents* old_contents,
+ content::WebContents* new_contents,
int index,
bool user_gesture) {
if (instant()) {
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698