| 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_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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Collapses sidebar identified by |tab| and |content_id| (has no effect | 68 // Collapses sidebar identified by |tab| and |content_id| (has no effect |
| 69 // if sidebar is not expanded). | 69 // if sidebar is not expanded). |
| 70 void CollapseSidebar(TabContents* tab, const std::string& content_id); | 70 void CollapseSidebar(TabContents* tab, const std::string& content_id); |
| 71 | 71 |
| 72 // Hides sidebar identified by |tab| and |content_id| (removes sidebar's | 72 // Hides sidebar identified by |tab| and |content_id| (removes sidebar's |
| 73 // mini tab). | 73 // mini tab). |
| 74 void HideSidebar(TabContents* tab, const std::string& content_id); | 74 void HideSidebar(TabContents* tab, const std::string& content_id); |
| 75 | 75 |
| 76 // Navigates sidebar identified by |tab| and |content_id| to |url|. | 76 // Navigates sidebar identified by |tab| and |content_id| to |url|. |
| 77 void NavigateSidebar(TabContents* tab, const std::string& content_id, | 77 void NavigateSidebar(TabContents* tab, |
| 78 const std::string& content_id, |
| 78 const GURL& url); | 79 const GURL& url); |
| 79 | 80 |
| 80 // Changes sidebar's badge text (displayed on the mini tab). | 81 // Changes sidebar's badge text (displayed on the mini tab). |
| 81 void SetSidebarBadgeText(TabContents* tab, const std::string& content_id, | 82 void SetSidebarBadgeText(TabContents* tab, |
| 83 const std::string& content_id, |
| 82 const string16& badge_text); | 84 const string16& badge_text); |
| 83 | 85 |
| 84 // Changes sidebar's icon (displayed on the mini tab). | 86 // Changes sidebar's icon (displayed on the mini tab). |
| 85 void SetSidebarIcon(TabContents* tab, const std::string& content_id, | 87 void SetSidebarIcon(TabContents* tab, |
| 88 const std::string& content_id, |
| 86 const SkBitmap& bitmap); | 89 const SkBitmap& bitmap); |
| 87 | 90 |
| 88 // Changes sidebar's title (mini tab's tooltip). | 91 // Changes sidebar's title (mini tab's tooltip). |
| 89 void SetSidebarTitle(TabContents* tab, const std::string& content_id, | 92 void SetSidebarTitle(TabContents* tab, |
| 93 const std::string& content_id, |
| 90 const string16& title); | 94 const string16& title); |
| 91 | 95 |
| 92 private: | 96 private: |
| 93 friend class base::RefCounted<SidebarManager>; | 97 friend class base::RefCounted<SidebarManager>; |
| 94 | 98 |
| 95 virtual ~SidebarManager(); | 99 virtual ~SidebarManager(); |
| 96 | 100 |
| 97 // Overridden from NotificationObserver. | 101 // Overridden from NotificationObserver. |
| 98 virtual void Observe(NotificationType type, | 102 virtual void Observe(NotificationType type, |
| 99 const NotificationSource& source, | 103 const NotificationSource& source, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 TabToSidebarHostMap tab_to_sidebar_host_; | 143 TabToSidebarHostMap tab_to_sidebar_host_; |
| 140 | 144 |
| 141 typedef std::map<SidebarContainer*, TabContents*> SidebarHostToTabMap; | 145 typedef std::map<SidebarContainer*, TabContents*> SidebarHostToTabMap; |
| 142 SidebarHostToTabMap sidebar_host_to_tab_; | 146 SidebarHostToTabMap sidebar_host_to_tab_; |
| 143 | 147 |
| 144 DISALLOW_COPY_AND_ASSIGN(SidebarManager); | 148 DISALLOW_COPY_AND_ASSIGN(SidebarManager); |
| 145 }; | 149 }; |
| 146 | 150 |
| 147 #endif // CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ | 151 #endif // CHROME_BROWSER_SIDEBAR_SIDEBAR_MANAGER_H_ |
| 148 | 152 |
| OLD | NEW |