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

Unified Diff: chrome/browser/chromeos/tab_closeable_state_watcher.cc

Issue 4694008: Make pink's TabContentsWrapper change compile on Windows.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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/chromeos/tab_closeable_state_watcher.cc
===================================================================
--- chrome/browser/chromeos/tab_closeable_state_watcher.cc (revision 66453)
+++ chrome/browser/chromeos/tab_closeable_state_watcher.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/browser/tab_contents_wrapper.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
@@ -36,24 +37,26 @@
// TabStripModelObserver implementation:
void TabCloseableStateWatcher::TabStripWatcher::TabInsertedAt(
- TabContents* tab_contents, int index, bool foreground) {
+ TabContentsWrapper* tab_contents, int index, bool foreground) {
main_watcher_->OnTabStripChanged(browser_, false);
}
void TabCloseableStateWatcher::TabStripWatcher::TabClosingAt(
- TabStripModel* tab_strip_model, TabContents* tab_contents, int index) {
+ TabStripModel* tab_strip_model,
+ TabContentsWrapper* tab_contents,
+ int index) {
// Check if the last tab is closing.
if (tab_strip_model->count() == 1)
main_watcher_->OnTabStripChanged(browser_, true);
}
void TabCloseableStateWatcher::TabStripWatcher::TabDetachedAt(
- TabContents* tab_contents, int index) {
+ TabContentsWrapper* tab_contents, int index) {
main_watcher_->OnTabStripChanged(browser_, false);
}
void TabCloseableStateWatcher::TabStripWatcher::TabChangedAt(
- TabContents* tab_contents, int index, TabChangeType change_type) {
+ TabContentsWrapper* tab_contents, int index, TabChangeType change_type) {
main_watcher_->OnTabStripChanged(browser_, false);
}
@@ -191,8 +194,9 @@
} else {
TabStripModel* tabstrip_model = browser_to_check->tabstrip_model();
if (tabstrip_model->count() == 1) {
- new_can_close = tabstrip_model->GetTabContentsAt(0)->GetURL() !=
- GURL(chrome::kChromeUINewTabURL); // Tab is not NewTabPage.
+ new_can_close =
+ tabstrip_model->GetTabContentsAt(0)->tab_contents()->GetURL() !=
+ GURL(chrome::kChromeUINewTabURL); // Tab is not NewTabPage.
} else {
new_can_close = true;
}

Powered by Google App Engine
This is Rietveld 408576698