Chromium Code Reviews| Index: components/enhanced_bookmarks/enhanced_bookmark_model_observer.h |
| diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h b/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0d7935fe5f823da4c871f9044c6d7f50bae3dd19 |
| --- /dev/null |
| +++ b/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ |
| +#define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ |
| + |
| +#include <string> |
| + |
| +class BookmarkNode; |
| + |
| +namespace enhanced_bookmarks { |
| + |
| +class EnhancedBookmarkModelObserver { |
| + public: |
| + // Called when the model has finished loading. |
| + 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
|
| + |
| + // Called from EnhancedBookmarkModel::ShutDown. |
| + virtual void EnhancedBookmarkModelShuttingDown() {}; |
| + |
| + // Called when a node is added to the model. |
| + virtual void EnhancedBookmarkAdded(const BookmarkNode* node) {}; |
| + |
| + // Called when a node is removed from the model. |
| + virtual void EnhancedBookmarkRemoved(const BookmarkNode* node) {}; |
| + |
| + // Called when all user editable nodes are removed from the model. |
| + virtual void EnhancedBookmarkAllUserNodesRemoved() {}; |
| + |
| + // Called when the remote id of a node changes. If |remote_id| is empty, the |
| + // remote id has been cleared. This could happen if multiple nodes with the |
| + // same remote id has been detected. |
| + virtual void EnhancedBookmarkRemoteIdChanged(const BookmarkNode* node, |
| + const std::string& old_remote_id, |
| + const std::string& remote_id) {}; |
| + |
| + protected: |
| + virtual ~EnhancedBookmarkModelObserver() {} |
| +}; |
| + |
| +} // namespace enhanced_bookmarks |
| +#endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ |