OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TABS_TAB_FINDER_H_ | 5 #ifndef CHROME_BROWSER_TABS_TAB_FINDER_H_ |
6 #define CHROME_BROWSER_TABS_TAB_FINDER_H_ | 6 #define CHROME_BROWSER_TABS_TAB_FINDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 28 matching lines...) Expand all Loading... |
39 static bool IsEnabled(); | 39 static bool IsEnabled(); |
40 | 40 |
41 // Returns the tab that matches the specified url. If a tab is found the | 41 // Returns the tab that matches the specified url. If a tab is found the |
42 // browser containing the tab is set in |existing_browser|. This searches | 42 // browser containing the tab is set in |existing_browser|. This searches |
43 // in |browser| first before checking any other browsers. | 43 // in |browser| first before checking any other browsers. |
44 TabContents* FindTab(Browser* browser, | 44 TabContents* FindTab(Browser* browser, |
45 const GURL& url, | 45 const GURL& url, |
46 Browser** existing_browser); | 46 Browser** existing_browser); |
47 | 47 |
48 // NotificationObserver overrides: | 48 // NotificationObserver overrides: |
49 virtual void Observe(NotificationType type, | 49 virtual void Observe(int type, |
50 const NotificationSource& source, | 50 const NotificationSource& source, |
51 const NotificationDetails& details) OVERRIDE; | 51 const NotificationDetails& details) OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 friend struct DefaultSingletonTraits<TabFinder>; | 54 friend struct DefaultSingletonTraits<TabFinder>; |
55 | 55 |
56 class TabContentsObserverImpl; | 56 class TabContentsObserverImpl; |
57 | 57 |
58 typedef std::map<TabContents*, GURL> TabContentsToURLMap; | 58 typedef std::map<TabContents*, GURL> TabContentsToURLMap; |
59 typedef std::set<TabContentsObserverImpl*> TabContentsObservers; | 59 typedef std::set<TabContentsObserverImpl*> TabContentsObservers; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 CancelableRequestConsumerTSimple<TabContents*> callback_consumer_; | 101 CancelableRequestConsumerTSimple<TabContents*> callback_consumer_; |
102 | 102 |
103 NotificationRegistrar registrar_; | 103 NotificationRegistrar registrar_; |
104 | 104 |
105 TabContentsObservers tab_contents_observers_; | 105 TabContentsObservers tab_contents_observers_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(TabFinder); | 107 DISALLOW_COPY_AND_ASSIGN(TabFinder); |
108 }; | 108 }; |
109 | 109 |
110 #endif // CHROME_BROWSER_TABS_TAB_FINDER_H_ | 110 #endif // CHROME_BROWSER_TABS_TAB_FINDER_H_ |
OLD | NEW |