| OLD | NEW |
| 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_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Returns whether the embedder wants permanent node |node| | 66 // Returns whether the embedder wants permanent node |node| |
| 67 // to always be visible or to only show them when not empty. | 67 // to always be visible or to only show them when not empty. |
| 68 virtual bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) = 0; | 68 virtual bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) = 0; |
| 69 | 69 |
| 70 // Wrapper around RecordAction defined in base/metrics/user_metrics.h | 70 // Wrapper around RecordAction defined in base/metrics/user_metrics.h |
| 71 // that ensure that the action is posted from the correct thread. | 71 // that ensure that the action is posted from the correct thread. |
| 72 virtual void RecordAction(const base::UserMetricsAction& action) = 0; | 72 virtual void RecordAction(const base::UserMetricsAction& action) = 0; |
| 73 | 73 |
| 74 // Returns a task that will be used to load any additional root nodes. This | 74 // Returns a task that will be used to load any additional root nodes. This |
| 75 // task will be invoked in the Profile's IO task runner. | 75 // task will be invoked in the Profile's IO task runner. |
| 76 virtual bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() = 0; | 76 virtual LoadExtraCallback GetLoadExtraNodesCallback() = 0; |
| 77 | 77 |
| 78 // Returns true if the |permanent_node| can have its title updated. | 78 // Returns true if the |permanent_node| can have its title updated. |
| 79 virtual bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) = 0; | 79 virtual bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) = 0; |
| 80 | 80 |
| 81 // Returns true if |node| should sync. | 81 // Returns true if |node| should sync. |
| 82 virtual bool CanSyncNode(const BookmarkNode* node) = 0; | 82 virtual bool CanSyncNode(const BookmarkNode* node) = 0; |
| 83 | 83 |
| 84 // Returns true if this node can be edited by the user. | 84 // Returns true if this node can be edited by the user. |
| 85 // TODO(joaodasilva): the model should check this more aggressively, and | 85 // TODO(joaodasilva): the model should check this more aggressively, and |
| 86 // should give the client a means to temporarily disable those checks. | 86 // should give the client a means to temporarily disable those checks. |
| 87 // http://crbug.com/49598 | 87 // http://crbug.com/49598 |
| 88 virtual bool CanBeEditedByUser(const BookmarkNode* node) = 0; | 88 virtual bool CanBeEditedByUser(const BookmarkNode* node) = 0; |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 virtual ~BookmarkClient() {} | 91 virtual ~BookmarkClient() {} |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace bookmarks | 94 } // namespace bookmarks |
| 95 | 95 |
| 96 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ | 96 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ |
| OLD | NEW |