diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 22:29:20 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 22:29:20 +0000 |
commit | b3c33d463366d2725ec4d669b98dc468a751c541 (patch) | |
tree | d8496a8ae8fc73ed71b93d67c055e9f1bba4fcc7 /chrome/browser/gtk/bookmark_context_menu.h | |
parent | 7b91dfd0bce7b4f864d9654e8bd0a9f93683cec0 (diff) | |
download | chromium_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/gtk/bookmark_context_menu.h')
-rw-r--r-- | chrome/browser/gtk/bookmark_context_menu.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/gtk/bookmark_context_menu.h b/chrome/browser/gtk/bookmark_context_menu.h index 38dc37a..db601c9 100644 --- a/chrome/browser/gtk/bookmark_context_menu.h +++ b/chrome/browser/gtk/bookmark_context_menu.h @@ -59,8 +59,8 @@ class BookmarkContextMenu : public BookmarkModelObserver, Profile* profile, Browser* browser, PageNavigator* navigator, - BookmarkNode* parent, - const std::vector<BookmarkNode*>& selection, + const BookmarkNode* parent, + const std::vector<const BookmarkNode*>& selection, ConfigurationType configuration); virtual ~BookmarkContextMenu(); @@ -89,23 +89,23 @@ class BookmarkContextMenu : public BookmarkModelObserver, virtual void Loaded(BookmarkModel* model) {} virtual void BookmarkModelBeingDeleted(BookmarkModel* model); virtual void BookmarkNodeMoved(BookmarkModel* model, - BookmarkNode* old_parent, + const BookmarkNode* old_parent, int old_index, - BookmarkNode* new_parent, + const BookmarkNode* new_parent, int new_index); virtual void BookmarkNodeAdded(BookmarkModel* model, - BookmarkNode* parent, + const BookmarkNode* parent, int index); virtual void BookmarkNodeRemoved(BookmarkModel* model, - BookmarkNode* parent, + const BookmarkNode* parent, int index, - BookmarkNode* node); + const BookmarkNode* node); virtual void BookmarkNodeChanged(BookmarkModel* model, - BookmarkNode* node); + const BookmarkNode* node); virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, - BookmarkNode* node) {} + const BookmarkNode* node) {} virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, - BookmarkNode* node); + const BookmarkNode* node); // Invoked from the various bookmark model observer methods. Closes the menu. void ModelChanged(); @@ -131,14 +131,14 @@ class BookmarkContextMenu : public BookmarkModelObserver, // Returns the parent for newly created folders/bookmarks. If selection_ // has one element and it is a folder, selection_[0] is returned, otherwise // parent_ is returned. - BookmarkNode* GetParentForNewNodes() const; + const BookmarkNode* GetParentForNewNodes() const; gfx::NativeView wnd_; Profile* profile_; Browser* browser_; PageNavigator* navigator_; - BookmarkNode* parent_; - std::vector<BookmarkNode*> selection_; + const BookmarkNode* parent_; + std::vector<const BookmarkNode*> selection_; BookmarkModel* model_; ConfigurationType configuration_; |