OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 private: | 611 private: |
612 FRIEND_TEST_ALL_PREFIXES(BrowserTest, PinnedTabDisposition); | 612 FRIEND_TEST_ALL_PREFIXES(BrowserTest, PinnedTabDisposition); |
613 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); | 613 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); |
614 | 614 |
615 // Used to describe why a tab is being detached. This is used by | 615 // Used to describe why a tab is being detached. This is used by |
616 // TabDetachedAtImpl. | 616 // TabDetachedAtImpl. |
617 enum DetachType { | 617 enum DetachType { |
618 // Result of TabDetachedAt. | 618 // Result of TabDetachedAt. |
619 DETACH_TYPE_DETACH, | 619 DETACH_TYPE_DETACH, |
620 | 620 |
621 // Result of TabReplacedAt. | |
622 DETACH_TYPE_REPLACE, | |
623 | |
624 // Result of the tab strip not having any significant tabs. | 621 // Result of the tab strip not having any significant tabs. |
625 DETACH_TYPE_EMPTY | 622 DETACH_TYPE_EMPTY |
626 }; | 623 }; |
627 | 624 |
628 bool IsPinned(TabContents* source); | 625 bool IsPinned(TabContents* source); |
629 | 626 |
630 // Overridden from TabStripModelDelegate: | 627 // Overridden from TabStripModelDelegate: |
631 virtual TabContents* AddBlankTab(bool foreground); | 628 virtual TabContents* AddBlankTab(bool foreground); |
632 virtual TabContents* AddBlankTabAt(int index, bool foreground); | 629 virtual TabContents* AddBlankTabAt(int index, bool foreground); |
633 virtual Browser* CreateNewStripWithContents(TabContents* detached_contents, | 630 virtual Browser* CreateNewStripWithContents(TabContents* detached_contents, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 virtual void TabClosingAt(TabContents* contents, int index); | 663 virtual void TabClosingAt(TabContents* contents, int index); |
667 virtual void TabDetachedAt(TabContents* contents, int index); | 664 virtual void TabDetachedAt(TabContents* contents, int index); |
668 virtual void TabDeselectedAt(TabContents* contents, int index); | 665 virtual void TabDeselectedAt(TabContents* contents, int index); |
669 virtual void TabSelectedAt(TabContents* old_contents, | 666 virtual void TabSelectedAt(TabContents* old_contents, |
670 TabContents* new_contents, | 667 TabContents* new_contents, |
671 int index, | 668 int index, |
672 bool user_gesture); | 669 bool user_gesture); |
673 virtual void TabMoved(TabContents* contents, | 670 virtual void TabMoved(TabContents* contents, |
674 int from_index, | 671 int from_index, |
675 int to_index); | 672 int to_index); |
676 virtual void TabReplacedAt(TabContents* old_contents, | |
677 TabContents* new_contents, | |
678 int index); | |
679 virtual void TabPinnedStateChanged(TabContents* contents, int index); | 673 virtual void TabPinnedStateChanged(TabContents* contents, int index); |
680 virtual void TabStripEmpty(); | 674 virtual void TabStripEmpty(); |
681 | 675 |
682 // Overridden from TabContentsDelegate: | 676 // Overridden from TabContentsDelegate: |
683 virtual void OpenURLFromTab(TabContents* source, | 677 virtual void OpenURLFromTab(TabContents* source, |
684 const GURL& url, | 678 const GURL& url, |
685 const GURL& referrer, | 679 const GURL& referrer, |
686 WindowOpenDisposition disposition, | 680 WindowOpenDisposition disposition, |
687 PageTransition::Type transition); | 681 PageTransition::Type transition); |
688 virtual void NavigationStateChanged(const TabContents* source, | 682 virtual void NavigationStateChanged(const TabContents* source, |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 mutable BooleanPrefMember use_vertical_tabs_; | 1045 mutable BooleanPrefMember use_vertical_tabs_; |
1052 | 1046 |
1053 // The profile's tab restore service. The service is owned by the profile, | 1047 // The profile's tab restore service. The service is owned by the profile, |
1054 // and we install ourselves as an observer. | 1048 // and we install ourselves as an observer. |
1055 TabRestoreService* tab_restore_service_; | 1049 TabRestoreService* tab_restore_service_; |
1056 | 1050 |
1057 DISALLOW_COPY_AND_ASSIGN(Browser); | 1051 DISALLOW_COPY_AND_ASSIGN(Browser); |
1058 }; | 1052 }; |
1059 | 1053 |
1060 #endif // CHROME_BROWSER_BROWSER_H_ | 1054 #endif // CHROME_BROWSER_BROWSER_H_ |
OLD | NEW |