summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_menu_bridge.mm
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 22:29:20 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 22:29:20 +0000
commitb3c33d463366d2725ec4d669b98dc468a751c541 (patch)
treed8496a8ae8fc73ed71b93d67c055e9f1bba4fcc7 /chrome/browser/cocoa/bookmark_menu_bridge.mm
parent7b91dfd0bce7b4f864d9654e8bd0a9f93683cec0 (diff)
downloadchromium_src-b3c33d463366d2725ec4d669b98dc468a751c541.zip
chromium_src-b3c33d463366d2725ec4d669b98dc468a751c541.tar.gz
chromium_src-b3c33d463366d2725ec4d669b98dc468a751c541.tar.bz2
Make bookmark model public interface use const BookmarkNode* instead of
BookmarkNode*. This helps in making the BookmarkNode class setters public also without worrying about someone inadvertently changing BookmarkNode properties directly for bookmark model bookmarks. Change all the call sites to reflect this. BUG=none TEST=none Review URL: http://codereview.chromium.org/146116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_menu_bridge.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_menu_bridge.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/bookmark_menu_bridge.mm b/chrome/browser/cocoa/bookmark_menu_bridge.mm
index fc29548..d13a509 100644
--- a/chrome/browser/cocoa/bookmark_menu_bridge.mm
+++ b/chrome/browser/cocoa/bookmark_menu_bridge.mm
@@ -65,36 +65,36 @@ void BookmarkMenuBridge::BookmarkModelBeingDeleted(BookmarkModel* model) {
}
void BookmarkMenuBridge::BookmarkNodeMoved(BookmarkModel* model,
- BookmarkNode* old_parent,
+ const BookmarkNode* old_parent,
int old_index,
- BookmarkNode* new_parent,
+ const BookmarkNode* new_parent,
int new_index) {
// TODO(jrg): this is brute force; perhaps we should be nicer.
Loaded(model);
}
void BookmarkMenuBridge::BookmarkNodeAdded(BookmarkModel* model,
- BookmarkNode* parent,
+ const BookmarkNode* parent,
int index) {
// TODO(jrg): this is brute force; perhaps we should be nicer.
Loaded(model);
}
void BookmarkMenuBridge::BookmarkNodeChanged(BookmarkModel* model,
- BookmarkNode* node) {
+ const BookmarkNode* node) {
// TODO(jrg): this is brute force; perhaps we should be nicer.
Loaded(model);
}
void BookmarkMenuBridge::BookmarkNodeFavIconLoaded(BookmarkModel* model,
- BookmarkNode* node) {
+ const BookmarkNode* node) {
// Nothing to do here -- no icons in the menubar menus yet.
// TODO(jrg):
// Both Safari and FireFox have icons in their menubars for bookmarks.
}
-void BookmarkMenuBridge::BookmarkNodeChildrenReordered(BookmarkModel* model,
- BookmarkNode* node) {
+void BookmarkMenuBridge::BookmarkNodeChildrenReordered(
+ BookmarkModel* model, const BookmarkNode* node) {
// TODO(jrg): this is brute force; perhaps we should be nicer.
Loaded(model);
}
@@ -171,9 +171,9 @@ const NSUInteger kMenuTrimSizeInChars = 30;
}
-void BookmarkMenuBridge::AddNodeToMenu(BookmarkNode* node, NSMenu* menu) {
+void BookmarkMenuBridge::AddNodeToMenu(const BookmarkNode* node, NSMenu* menu) {
for (int i = 0; i < node->GetChildCount(); i++) {
- BookmarkNode* child = node->GetChild(i);
+ const BookmarkNode* child = node->GetChild(i);
NSString* full_title = base::SysWideToNSString(child->GetTitle());
NSString* title = full_title;
if ([title length] > kMaximumMenuWidthInChars) {