Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ | |
| 6 #define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 class BookmarkNode; | |
| 11 | |
| 12 namespace enhanced_bookmarks { | |
| 13 | |
| 14 class EnhancedBookmarkModelObserver { | |
| 15 public: | |
| 16 // Called when the model has finished loading. | |
| 17 virtual void EnhancedBookmarkModelLoaded() {}; | |
|
noyau (Ping after 24h)
2014/09/18 08:43:22
I'll make all these method virtual to force implem
Rune Fevang
2014/09/19 01:18:07
OK, made everything but remote id changed pure vir
| |
| 18 | |
| 19 // Called from EnhancedBookmarkModel::ShutDown. | |
| 20 virtual void EnhancedBookmarkModelShuttingDown() {}; | |
| 21 | |
| 22 // Called when a node is added to the model. | |
| 23 virtual void EnhancedBookmarkAdded(const BookmarkNode* node) {}; | |
| 24 | |
| 25 // Called when a node is removed from the model. | |
| 26 virtual void EnhancedBookmarkRemoved(const BookmarkNode* node) {}; | |
| 27 | |
| 28 // Called when all user editable nodes are removed from the model. | |
| 29 virtual void EnhancedBookmarkAllUserNodesRemoved() {}; | |
| 30 | |
| 31 // Called when the remote id of a node changes. If |remote_id| is empty, the | |
| 32 // remote id has been cleared. This could happen if multiple nodes with the | |
| 33 // same remote id has been detected. | |
| 34 virtual void EnhancedBookmarkRemoteIdChanged(const BookmarkNode* node, | |
| 35 const std::string& old_remote_id, | |
| 36 const std::string& remote_id) {}; | |
| 37 | |
| 38 protected: | |
| 39 virtual ~EnhancedBookmarkModelObserver() {} | |
| 40 }; | |
| 41 | |
| 42 } // namespace enhanced_bookmarks | |
| 43 #endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ | |
| OLD | NEW |