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

Unified Diff: chrome/browser/tabs/tab_strip_model.h

Issue 7033048: Multi-tab: Adding new Notification when tab selection changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 6 months 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
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model.h
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index df4d83b4559b245d1e66855dfead270f58aaa5fb..21270cd52a0234371cdc4d59b0b732faf73e1f7d 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -514,15 +514,22 @@ class TabStripModel : public NotificationObserver {
TabContentsWrapper* GetContentsAt(int index) const;
- // If the TabContentsWrapper at |to_index| differs from |old_contents|
- // notifies observers.
- void NotifyTabSelectedIfChanged(TabContentsWrapper* old_contents,
- int to_index,
- bool user_gesture);
-
- // Notifies the observers the active tab changed. |old_active_index| gives
- // the old active index.
- void NotifyActiveTabChanged(int old_active_index);
+ // Notifies the observers if the active tab has changed. If |old_contents| is
+ // non-null a TabDeactivated notification is sent right before sending
+ // ActiveTabChanged notification.
+ void NotifyIfActiveTabChanged(TabContentsWrapper* old_contents,
+ bool user_gesture);
+
+ // Notifies the observers if the active tab or the tab selection has changed.
+ // If |old_contents| is non-null a TabDeactivated notification is sent right
+ // before sending ActiveTabChanged notification. |old_model| is a snapshot of
+ // |selection_model_| before the change.
+ // Note: This function might end up sending 0 to 3 notifications in the
+ // following order: TabDeactivated, ActiveTabChanged, TabSelectionChanged.
+ void NotifyIfActiveOrSelectionChanged(
+ TabContentsWrapper* old_contents,
+ bool user_gesture,
+ const TabStripSelectionModel& old_model);
// Returns the number of New Tab tabs in the TabStripModel.
int GetNewTabCount() const;
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698