| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // C++ controller for the bookmark menu; one per AppController (which | 5 // C++ controller for the bookmark menu; one per AppController (which |
| 6 // means there is only one). When bookmarks are changed, this class | 6 // means there is only one). When bookmarks are changed, this class |
| 7 // takes care of updating Cocoa bookmark menus. This is not named | 7 // takes care of updating Cocoa bookmark menus. This is not named |
| 8 // BookmarkMenuController to help avoid confusion between languages. | 8 // BookmarkMenuController to help avoid confusion between languages. |
| 9 // This class needs to be C++, not ObjC, since it derives from | 9 // This class needs to be C++, not ObjC, since it derives from |
| 10 // BookmarkModelObserver. | 10 // BookmarkModelObserver. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // TODO(jrg): add a counter to enforce maximum nodes added | 69 // TODO(jrg): add a counter to enforce maximum nodes added |
| 70 void AddNodeToMenu(BookmarkNode* node, NSMenu* menu); | 70 void AddNodeToMenu(BookmarkNode* node, NSMenu* menu); |
| 71 | 71 |
| 72 // Return the Bookmark menu. | 72 // Return the Bookmark menu. |
| 73 NSMenu* BookmarkMenu(); | 73 NSMenu* BookmarkMenu(); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 friend class BookmarkMenuBridgeTest; | 76 friend class BookmarkMenuBridgeTest; |
| 77 | 77 |
| 78 BookmarkMenuCocoaController* controller_; // strong | 78 BookmarkMenuCocoaController* controller_; // strong |
| 79 bool observing_; // are we observing the browser list? |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 #endif // CHROME_BROWSER_COCOA_BOOKMARK_MENU_BRIDGE_H_ | 82 #endif // CHROME_BROWSER_COCOA_BOOKMARK_MENU_BRIDGE_H_ |
| OLD | NEW |