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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 void TabNavigating(TabContents* contents, 332 void TabNavigating(TabContents* contents,
333 content::PageTransition transition); 333 content::PageTransition transition);
334 334
335 // Forget all Opener relationships that are stored (but _not_ group 335 // Forget all Opener relationships that are stored (but _not_ group
336 // relationships!) This is to reduce unpredictable tab switching behavior 336 // relationships!) This is to reduce unpredictable tab switching behavior
337 // in complex session states. The exact circumstances under which this method 337 // in complex session states. The exact circumstances under which this method
338 // is called are left up to the implementation of the selected 338 // is called are left up to the implementation of the selected
339 // TabStripModelOrderController. 339 // TabStripModelOrderController.
340 void ForgetAllOpeners(); 340 void ForgetAllOpeners();
341 341
342 // Forgets the group affiliation of the specified TabContents. This 342 // Forgets the group affiliation of the specified WebContents. This
343 // should be called when a TabContents that is part of a logical group 343 // should be called when a WebContents that is part of a logical group
344 // of tabs is moved to a new logical context by the user (e.g. by typing a new 344 // of tabs is moved to a new logical context by the user (e.g. by typing a new
345 // URL or selecting a bookmark). This also forgets the opener, which is 345 // URL or selecting a bookmark). This also forgets the opener, which is
346 // considered a weaker relationship than group. 346 // considered a weaker relationship than group.
347 void ForgetGroup(TabContents* contents); 347 void ForgetGroup(content::WebContents* contents);
348 348
349 // Returns true if the group/opener relationships present for |contents| 349 // Returns true if the group/opener relationships present for |contents|
350 // should be reset when _any_ selection change occurs in the model. 350 // should be reset when _any_ selection change occurs in the model.
351 bool ShouldResetGroupOnSelect(TabContents* contents) const; 351 bool ShouldResetGroupOnSelect(content::WebContents* contents) const;
352 352
353 // Changes the blocked state of the tab at |index|. 353 // Changes the blocked state of the tab at |index|.
354 void SetTabBlocked(int index, bool blocked); 354 void SetTabBlocked(int index, bool blocked);
355 355
356 // Changes the pinned state of the tab at |index|. See description above 356 // Changes the pinned state of the tab at |index|. See description above
357 // class for details on this. 357 // class for details on this.
358 void SetTabPinned(int index, bool pinned); 358 void SetTabPinned(int index, bool pinned);
359 359
360 // Returns true if the tab at |index| is pinned. 360 // Returns true if the tab at |index| is pinned.
361 // See description above class for details on pinned tabs. 361 // See description above class for details on pinned tabs.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 bool create_historical_tabs); 537 bool create_historical_tabs);
538 538
539 // Gets the WebContents at an index. Does no bounds checking. 539 // Gets the WebContents at an index. Does no bounds checking.
540 TabContents* GetTabContentsAtImpl(int index) const; 540 TabContents* GetTabContentsAtImpl(int index) const;
541 content::WebContents* GetWebContentsAtImpl(int index) const; 541 content::WebContents* GetWebContentsAtImpl(int index) const;
542 542
543 // Notifies the observers if the active tab is being deactivated. 543 // Notifies the observers if the active tab is being deactivated.
544 void NotifyIfTabDeactivated(content::WebContents* contents); 544 void NotifyIfTabDeactivated(content::WebContents* contents);
545 545
546 // Notifies the observers if the active tab has changed. 546 // Notifies the observers if the active tab has changed.
547 void NotifyIfActiveTabChanged(TabContents* old_contents, 547 void NotifyIfActiveTabChanged(content::WebContents* old_contents,
548 NotifyTypes notify_types); 548 NotifyTypes notify_types);
549 549
550 // Notifies the observers if the active tab or the tab selection has changed. 550 // Notifies the observers if the active tab or the tab selection has changed.
551 // |old_model| is a snapshot of |selection_model_| before the change. 551 // |old_model| is a snapshot of |selection_model_| before the change.
552 // Note: This function might end up sending 0 to 2 notifications in the 552 // Note: This function might end up sending 0 to 2 notifications in the
553 // following order: ActiveTabChanged, TabSelectionChanged. 553 // following order: ActiveTabChanged, TabSelectionChanged.
554 void NotifyIfActiveOrSelectionChanged( 554 void NotifyIfActiveOrSelectionChanged(
555 TabContents* old_contents, 555 TabContents* old_contents,
556 NotifyTypes notify_types, 556 NotifyTypes notify_types,
557 const TabStripSelectionModel& old_model); 557 const TabStripSelectionModel& old_model);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 673
674 // A scoped container for notification registries. 674 // A scoped container for notification registries.
675 content::NotificationRegistrar registrar_; 675 content::NotificationRegistrar registrar_;
676 676
677 TabStripSelectionModel selection_model_; 677 TabStripSelectionModel selection_model_;
678 678
679 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); 679 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel);
680 }; 680 };
681 681
682 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 682 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698