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_UI_COCOA_HISTORY_MENU_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 #include <map> | 10 #include <map> |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 kRecentlyClosed = 460, // Used for items in the recently closed section. | 120 kRecentlyClosed = 460, // Used for items in the recently closed section. |
121 kShowFullSeparator = 480 // Separator after the recently closed section. | 121 kShowFullSeparator = 480 // Separator after the recently closed section. |
122 }; | 122 }; |
123 | 123 |
124 explicit HistoryMenuBridge(Profile* profile); | 124 explicit HistoryMenuBridge(Profile* profile); |
125 virtual ~HistoryMenuBridge(); | 125 virtual ~HistoryMenuBridge(); |
126 | 126 |
127 // content::NotificationObserver: | 127 // content::NotificationObserver: |
128 virtual void Observe(int type, | 128 virtual void Observe(int type, |
129 const content::NotificationSource& source, | 129 const content::NotificationSource& source, |
130 const content::NotificationDetails& details); | 130 const content::NotificationDetails& details) OVERRIDE; |
131 | 131 |
132 // TabRestoreServiceObserver: | 132 // TabRestoreServiceObserver: |
133 virtual void TabRestoreServiceChanged(TabRestoreService* service); | 133 virtual void TabRestoreServiceChanged(TabRestoreService* service) OVERRIDE; |
134 virtual void TabRestoreServiceDestroyed(TabRestoreService* service); | 134 virtual void TabRestoreServiceDestroyed(TabRestoreService* service) OVERRIDE; |
135 | 135 |
136 // MainMenuItem: | 136 // MainMenuItem: |
137 virtual void ResetMenu(); | 137 virtual void ResetMenu() OVERRIDE; |
138 virtual void BuildMenu(); | 138 virtual void BuildMenu() OVERRIDE; |
139 | 139 |
140 // Looks up an NSMenuItem in the |menu_item_map_| and returns the | 140 // Looks up an NSMenuItem in the |menu_item_map_| and returns the |
141 // corresponding HistoryItem. | 141 // corresponding HistoryItem. |
142 HistoryItem* HistoryItemForMenuItem(NSMenuItem* item); | 142 HistoryItem* HistoryItemForMenuItem(NSMenuItem* item); |
143 | 143 |
144 // I wish I has a "friend @class" construct. These are used by the HMCC | 144 // I wish I has a "friend @class" construct. These are used by the HMCC |
145 // to access model information when responding to actions. | 145 // to access model information when responding to actions. |
146 HistoryService* service(); | 146 HistoryService* service(); |
147 Profile* profile(); | 147 Profile* profile(); |
148 | 148 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 bool create_in_progress_; | 225 bool create_in_progress_; |
226 bool need_recreate_; | 226 bool need_recreate_; |
227 | 227 |
228 // The default favicon if a HistoryItem does not have one. | 228 // The default favicon if a HistoryItem does not have one. |
229 scoped_nsobject<NSImage> default_favicon_; | 229 scoped_nsobject<NSImage> default_favicon_; |
230 | 230 |
231 DISALLOW_COPY_AND_ASSIGN(HistoryMenuBridge); | 231 DISALLOW_COPY_AND_ASSIGN(HistoryMenuBridge); |
232 }; | 232 }; |
233 | 233 |
234 #endif // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ | 234 #endif // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ |
OLD | NEW |