OLD | NEW |
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 | 513 |
514 // Notifies the observers if the active tab has changed. | 514 // Notifies the observers if the active tab has changed. |
515 void NotifyIfActiveTabChanged(content::WebContents* old_contents, | 515 void NotifyIfActiveTabChanged(content::WebContents* old_contents, |
516 NotifyTypes notify_types); | 516 NotifyTypes notify_types); |
517 | 517 |
518 // Notifies the observers if the active tab or the tab selection has changed. | 518 // Notifies the observers if the active tab or the tab selection has changed. |
519 // |old_model| is a snapshot of |selection_model_| before the change. | 519 // |old_model| is a snapshot of |selection_model_| before the change. |
520 // Note: This function might end up sending 0 to 2 notifications in the | 520 // Note: This function might end up sending 0 to 2 notifications in the |
521 // following order: ActiveTabChanged, TabSelectionChanged. | 521 // following order: ActiveTabChanged, TabSelectionChanged. |
522 void NotifyIfActiveOrSelectionChanged( | 522 void NotifyIfActiveOrSelectionChanged( |
523 TabContents* old_contents, | 523 content::WebContents* old_contents, |
524 NotifyTypes notify_types, | 524 NotifyTypes notify_types, |
525 const TabStripSelectionModel& old_model); | 525 const TabStripSelectionModel& old_model); |
526 | 526 |
527 // Sets the selection to |new_model| and notifies any observers. | 527 // Sets the selection to |new_model| and notifies any observers. |
528 // Note: This function might end up sending 0 to 3 notifications in the | 528 // Note: This function might end up sending 0 to 3 notifications in the |
529 // following order: TabDeactivated, ActiveTabChanged, TabSelectionChanged. | 529 // following order: TabDeactivated, ActiveTabChanged, TabSelectionChanged. |
530 void SetSelection(const TabStripSelectionModel& new_model, | 530 void SetSelection(const TabStripSelectionModel& new_model, |
531 NotifyTypes notify_types); | 531 NotifyTypes notify_types); |
532 | 532 |
533 // Selects either the next tab (|forward| is true), or the previous tab | 533 // Selects either the next tab (|forward| is true), or the previous tab |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 | 638 |
639 // A scoped container for notification registries. | 639 // A scoped container for notification registries. |
640 content::NotificationRegistrar registrar_; | 640 content::NotificationRegistrar registrar_; |
641 | 641 |
642 TabStripSelectionModel selection_model_; | 642 TabStripSelectionModel selection_model_; |
643 | 643 |
644 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 644 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
645 }; | 645 }; |
646 | 646 |
647 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 647 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
OLD | NEW |