| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 // Returns whether the given |node| is one of the permanent nodes - root node, | 260 // Returns whether the given |node| is one of the permanent nodes - root node, |
| 261 // 'bookmark bar' node, 'other' node or 'mobile' node. | 261 // 'bookmark bar' node, 'other' node or 'mobile' node. |
| 262 bool is_permanent_node(const BookmarkNode* node) const { | 262 bool is_permanent_node(const BookmarkNode* node) const { |
| 263 return node == &root_ || | 263 return node == &root_ || |
| 264 node == bookmark_bar_node_ || | 264 node == bookmark_bar_node_ || |
| 265 node == other_node_ || | 265 node == other_node_ || |
| 266 node == mobile_node_; | 266 node == mobile_node_; |
| 267 } | 267 } |
| 268 | 268 |
| 269 Profile* profile() { return profile_; } | |
| 270 | |
| 271 // Returns the parent the last node was added to. This never returns NULL | 269 // Returns the parent the last node was added to. This never returns NULL |
| 272 // (as long as the model is loaded). | 270 // (as long as the model is loaded). |
| 273 const BookmarkNode* GetParentForNewNodes(); | 271 const BookmarkNode* GetParentForNewNodes(); |
| 274 | 272 |
| 275 void AddObserver(BookmarkModelObserver* observer); | 273 void AddObserver(BookmarkModelObserver* observer); |
| 276 void RemoveObserver(BookmarkModelObserver* observer); | 274 void RemoveObserver(BookmarkModelObserver* observer); |
| 277 | 275 |
| 278 // Notifies the observers that an extensive set of changes is about to happen, | 276 // Notifies the observers that an extensive set of changes is about to happen, |
| 279 // such as during import or sync, so they can delay any expensive UI updates | 277 // such as during import or sync, so they can delay any expensive UI updates |
| 280 // until it's finished. | 278 // until it's finished. |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 523 |
| 526 // See description of IsDoingExtensiveChanges above. | 524 // See description of IsDoingExtensiveChanges above. |
| 527 int extensive_changes_; | 525 int extensive_changes_; |
| 528 | 526 |
| 529 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; | 527 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
| 530 | 528 |
| 531 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 529 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
| 532 }; | 530 }; |
| 533 | 531 |
| 534 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 532 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| OLD | NEW |