Index: chrome/browser/bookmarks/bookmark_model.h |
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h |
index 1b7eec89d94bb91ed47498a2a84870eb9517c659..5ec388b49e346fec9c377248897bae8eda4c84ae 100644 |
--- a/chrome/browser/bookmarks/bookmark_model.h |
+++ b/chrome/browser/bookmarks/bookmark_model.h |
@@ -158,6 +158,26 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode> { |
DISALLOW_COPY_AND_ASSIGN(BookmarkNode); |
}; |
+// BookmarkPermanentNode ------------------------------------------------------- |
+ |
+// Node used for the permanent folders (excluding the root). |
+class BookmarkPermanentNode : public BookmarkNode { |
+ public: |
+ explicit BookmarkPermanentNode(int64 id); |
+ virtual ~BookmarkPermanentNode(); |
+ |
+ // WARNING: this code is used for other projects. Contact noyau@ for details. |
+ void set_visible(bool value) { visible_ = value; } |
+ |
+ // BookmarkNode overrides: |
+ virtual bool IsVisible() const OVERRIDE; |
+ |
+ private: |
+ bool visible_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode); |
+}; |
+ |
// BookmarkModel -------------------------------------------------------------- |
// BookmarkModel provides a directed acyclic graph of URLs and folders. |
@@ -329,8 +349,8 @@ class BookmarkModel : public content::NotificationObserver, |
return expanded_state_tracker_.get(); |
} |
- // Sets whether the mobile folder is visible. This is set by sync. |
- void SetMobileFolderVisible(bool value); |
+ // Sets the visibility of one of the permanent nodes. This is set by sync. |
+ void SetPermanentNodeVisibile(BookmarkNode::Type type, bool value); |
noyau (Ping after 24h)
2011/12/07 16:49:33
Spelling: Visibile instead of Visible.
|
private: |
friend class BookmarkCodecTest; |
@@ -382,7 +402,7 @@ class BookmarkModel : public content::NotificationObserver, |
// Creates one of the possible permanent nodes (bookmark bar node, other node |
// and mobile node) from |type|. |
- BookmarkNode* CreatePermanentNode(BookmarkNode::Type type); |
+ BookmarkPermanentNode* CreatePermanentNode(BookmarkNode::Type type); |
// Notification that a favicon has finished loading. If we can decode the |
// favicon, FaviconLoaded is invoked. |
@@ -431,9 +451,9 @@ class BookmarkModel : public content::NotificationObserver, |
// children. |
BookmarkNode root_; |
- BookmarkNode* bookmark_bar_node_; |
- BookmarkNode* other_node_; |
- BookmarkNode* mobile_node_; |
+ BookmarkPermanentNode* bookmark_bar_node_; |
+ BookmarkPermanentNode* other_node_; |
+ BookmarkPermanentNode* mobile_node_; |
// The maximum ID assigned to the bookmark nodes in the model. |
int64 next_node_id_; |