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_SIDEBAR_SIDEBAR_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ |
6 #define CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ | 6 #define CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const string16& title); | 92 const string16& title); |
93 | 93 |
94 private: | 94 private: |
95 friend class base::RefCounted<SidebarManager>; | 95 friend class base::RefCounted<SidebarManager>; |
96 | 96 |
97 virtual ~SidebarManager(); | 97 virtual ~SidebarManager(); |
98 | 98 |
99 // Overridden from content::NotificationObserver. | 99 // Overridden from content::NotificationObserver. |
100 virtual void Observe(int type, | 100 virtual void Observe(int type, |
101 const content::NotificationSource& source, | 101 const content::NotificationSource& source, |
102 const content::NotificationDetails& details); | 102 const content::NotificationDetails& details) OVERRIDE; |
103 | 103 |
104 // Overridden from SidebarContainer::Delegate. | 104 // Overridden from SidebarContainer::Delegate. |
105 virtual void UpdateSidebar(SidebarContainer* host); | 105 virtual void UpdateSidebar(SidebarContainer* host) OVERRIDE; |
106 | 106 |
107 // Hides all sidebars registered for |tab|. | 107 // Hides all sidebars registered for |tab|. |
108 void HideAllSidebars(TabContents* tab); | 108 void HideAllSidebars(TabContents* tab); |
109 | 109 |
110 // Returns SidebarContainer corresponding to |sidebar_contents|. | 110 // Returns SidebarContainer corresponding to |sidebar_contents|. |
111 SidebarContainer* FindSidebarContainerFor(TabContents* sidebar_contents); | 111 SidebarContainer* FindSidebarContainerFor(TabContents* sidebar_contents); |
112 | 112 |
113 // Registers new SidebarContainer for |tab|. There must be no | 113 // Registers new SidebarContainer for |tab|. There must be no |
114 // other SidebarContainers registered for the RenderViewHost at the moment. | 114 // other SidebarContainers registered for the RenderViewHost at the moment. |
115 void RegisterSidebarContainerFor(TabContents* tab, | 115 void RegisterSidebarContainerFor(TabContents* tab, |
(...skipping 24 matching lines...) Expand all Loading... |
140 typedef std::map<TabContents*, SidebarStateForTab> TabToSidebarHostMap; | 140 typedef std::map<TabContents*, SidebarStateForTab> TabToSidebarHostMap; |
141 TabToSidebarHostMap tab_to_sidebar_host_; | 141 TabToSidebarHostMap tab_to_sidebar_host_; |
142 | 142 |
143 typedef std::map<SidebarContainer*, TabContents*> SidebarHostToTabMap; | 143 typedef std::map<SidebarContainer*, TabContents*> SidebarHostToTabMap; |
144 SidebarHostToTabMap sidebar_host_to_tab_; | 144 SidebarHostToTabMap sidebar_host_to_tab_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(SidebarManager); | 146 DISALLOW_COPY_AND_ASSIGN(SidebarManager); |
147 }; | 147 }; |
148 | 148 |
149 #endif // CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ | 149 #endif // CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ |
OLD | NEW |