Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 // Returns the NSMenuItem for a given BookmarkNode. 136 // Returns the NSMenuItem for a given BookmarkNode.
137 NSMenuItem* MenuItemForNode(const bookmarks::BookmarkNode* node); 137 NSMenuItem* MenuItemForNode(const bookmarks::BookmarkNode* node);
138 138
139 // Start watching the bookmarks for changes. 139 // Start watching the bookmarks for changes.
140 void ObserveBookmarkModel(); 140 void ObserveBookmarkModel();
141 141
142 private: 142 private:
143 friend class BookmarkMenuBridgeTest; 143 friend class BookmarkMenuBridgeTest;
144 144
145 // True iff the menu is up-to-date with the actual BookmarkModel. 145 // True iff the menu is up to date with the actual BookmarkModel.
146 bool menuIsValid_; 146 bool menuIsValid_;
147 147
148 Profile* profile_; // weak 148 Profile* profile_; // weak
149 BookmarkMenuCocoaController* controller_; // strong 149 BookmarkMenuCocoaController* controller_; // strong
150 150
151 // The folder image so we can use one copy for all. 151 // The folder image so we can use one copy for all.
152 base::scoped_nsobject<NSImage> folder_image_; 152 base::scoped_nsobject<NSImage> folder_image_;
153 153
154 // In order to appropriately update items in the bookmark menu, without 154 // In order to appropriately update items in the bookmark menu, without
155 // forcing a rebuild, map the model's nodes to menu items. 155 // forcing a rebuild, map the model's nodes to menu items.
156 std::map<const bookmarks::BookmarkNode*, NSMenuItem*> bookmark_nodes_; 156 std::map<const bookmarks::BookmarkNode*, NSMenuItem*> bookmark_nodes_;
157 }; 157 };
158 158
159 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_MENU_BRIDGE_H_ 159 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_MENU_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698