Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: components/enhanced_bookmarks/enhanced_bookmark_model_observer.h

Issue 682933002: Reduce frequency of requesting bookmark clusters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
6 #define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ 6 #define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class BookmarkNode; 10 class BookmarkNode;
11 11
12 namespace enhanced_bookmarks { 12 namespace enhanced_bookmarks {
13 13
14 class EnhancedBookmarkModelObserver { 14 class EnhancedBookmarkModelObserver {
15 public: 15 public:
16 // Called when the model has finished loading. 16 // Called when the model has finished loading.
17 virtual void EnhancedBookmarkModelLoaded() = 0; 17 virtual void EnhancedBookmarkModelLoaded() = 0;
18 18
19 // Called from EnhancedBookmarkModel::ShutDown. 19 // Called from EnhancedBookmarkModel::ShutDown.
20 virtual void EnhancedBookmarkModelShuttingDown() = 0; 20 virtual void EnhancedBookmarkModelShuttingDown() = 0;
21 21
22 // Called when a node is added to the model. 22 // Called when a node is added to the model.
23 virtual void EnhancedBookmarkAdded(const BookmarkNode* node) = 0; 23 virtual void EnhancedBookmarkAdded(const BookmarkNode* node) = 0;
24 24
25 // Called when a node is removed from the model. 25 // Called when a node is removed from the model.
26 virtual void EnhancedBookmarkRemoved(const BookmarkNode* node) = 0; 26 virtual void EnhancedBookmarkRemoved(const BookmarkNode* node) = 0;
27 27
28 // Called when a node has changed.
29 virtual void EnhancedBookmarkNodeChanged(const BookmarkNode* node) = 0;
30
28 // Called when all user editable nodes are removed from the model. 31 // Called when all user editable nodes are removed from the model.
29 virtual void EnhancedBookmarkAllUserNodesRemoved() = 0; 32 virtual void EnhancedBookmarkAllUserNodesRemoved() = 0;
30 33
31 // Called when the remote id of a node changes. If |remote_id| is empty, the 34 // 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 35 // remote id has been cleared. This could happen if multiple nodes with the
33 // same remote id has been detected. 36 // same remote id has been detected.
34 virtual void EnhancedBookmarkRemoteIdChanged(const BookmarkNode* node, 37 virtual void EnhancedBookmarkRemoteIdChanged(const BookmarkNode* node,
35 const std::string& old_remote_id, 38 const std::string& old_remote_id,
36 const std::string& remote_id) {}; 39 const std::string& remote_id) {};
37 40
38 protected: 41 protected:
39 virtual ~EnhancedBookmarkModelObserver() {} 42 virtual ~EnhancedBookmarkModelObserver() {}
40 }; 43 };
41 44
42 } // namespace enhanced_bookmarks 45 } // namespace enhanced_bookmarks
43 #endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_ 46 #endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698