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

Unified Diff: chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc

Issue 11451019: Remove TabContents from ui/ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years 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/ash/launcher/browser_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
index 99cb996776415ebbae44e82bceb4f471ddeef1aa..118cac7e1380b1999cdd7313d6b1c560982e6630 100644
--- a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/web_applications/web_app.h"
#include "content/public/browser/web_contents.h"
@@ -64,7 +63,7 @@ void BrowserLauncherItemController::Init() {
app_status);
}
// In testing scenarios we can get tab strips with no active contents.
- if (tab_model_->GetActiveTabContents())
+ if (tab_model_->active_index() != TabStripModel::kNoTab)
UpdateLauncher(tab_model_->GetActiveWebContents());
}
@@ -111,9 +110,8 @@ void BrowserLauncherItemController::BrowserActivationStateChanged() {
string16 BrowserLauncherItemController::GetTitle() {
if (type() == TYPE_TABBED || type() == TYPE_EXTENSION_PANEL) {
- if (tab_model_->GetActiveTabContents()) {
- const content::WebContents* contents =
- tab_model_->GetActiveTabContents()->web_contents();
+ if (tab_model_->active_index() != TabStripModel::kNoTab) {
+ const content::WebContents* contents = tab_model_->GetActiveWebContents();
if (contents)
return contents->GetTitle();
}

Powered by Google App Engine
This is Rietveld 408576698