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.
5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
6 #define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
12 namespace enhanced_bookmarks
{
14 class EnhancedBookmarkModelObserver
{
16 // Called when the model has finished loading.
17 virtual void EnhancedBookmarkModelLoaded() = 0;
19 // Called from EnhancedBookmarkModel::ShutDown.
20 virtual void EnhancedBookmarkModelShuttingDown() = 0;
22 // Called when a node is added to the model.
23 virtual void EnhancedBookmarkAdded(const BookmarkNode
* node
) = 0;
25 // Called when a node is removed from the model.
26 virtual void EnhancedBookmarkRemoved(const BookmarkNode
* node
) = 0;
28 // Called when a node has changed.
29 virtual void EnhancedBookmarkNodeChanged(const BookmarkNode
* node
) = 0;
31 // Called when all user editable nodes are removed from the model.
32 virtual void EnhancedBookmarkAllUserNodesRemoved() = 0;
34 // Called when the remote id of a node changes. If |remote_id| is empty, the
35 // remote id has been cleared. This could happen if multiple nodes with the
36 // same remote id has been detected.
37 virtual void EnhancedBookmarkRemoteIdChanged(const BookmarkNode
* node
,
38 const std::string
& old_remote_id
,
39 const std::string
& remote_id
) {};
42 virtual ~EnhancedBookmarkModelObserver() {}
45 } // namespace enhanced_bookmarks
46 #endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_