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 <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | |
10 | 11 |
11 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
12 #include "base/task/cancelable_task_tracker.h" | 13 #include "base/task/cancelable_task_tracker.h" |
13 #include "components/bookmarks/browser/bookmark_storage.h" | 14 #include "components/bookmarks/browser/bookmark_storage.h" |
14 #include "components/favicon_base/favicon_callback.h" | 15 #include "components/favicon_base/favicon_callback.h" |
15 #include "components/favicon_base/favicon_types.h" | 16 #include "components/favicon_base/favicon_types.h" |
16 #include "components/keyed_service/core/keyed_service.h" | 17 #include "components/keyed_service/core/keyed_service.h" |
17 | 18 |
18 class GURL; | 19 class GURL; |
19 | 20 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 | 60 |
60 // Returns true if the embedder supports typed count for URL. | 61 // Returns true if the embedder supports typed count for URL. |
61 virtual bool SupportsTypedCountForUrls(); | 62 virtual bool SupportsTypedCountForUrls(); |
62 | 63 |
63 // Retrieves the number of times each bookmark URL has been typed in | 64 // Retrieves the number of times each bookmark URL has been typed in |
64 // the Omnibox by the user. For each key (URL) in |url_typed_count_map|, | 65 // the Omnibox by the user. For each key (URL) in |url_typed_count_map|, |
65 // the corresponding value will be updated with the typed count of that URL. | 66 // the corresponding value will be updated with the typed count of that URL. |
66 // |url_typed_count_map| must not be null. | 67 // |url_typed_count_map| must not be null. |
67 virtual void GetTypedCountForUrls(UrlTypedCountMap* url_typed_count_map); | 68 virtual void GetTypedCountForUrls(UrlTypedCountMap* url_typed_count_map); |
68 | 69 |
70 // Metadata keys to be excluded from bookmark nodes in the storage. | |
sky
2017/05/26 03:07:38
How about: Returns the set of keys that are not re
ssid
2017/05/30 21:39:14
Done.
| |
71 virtual std::vector<std::string> ExecludedMetaKeys(); | |
sky
2017/05/26 03:07:38
GetExcludedMetaDataKeys().
ssid
2017/05/30 21:39:14
Codec uses MetaInfo everywhere. Changed it to Meta
| |
72 | |
69 // Returns whether the embedder wants permanent node |node| | 73 // Returns whether the embedder wants permanent node |node| |
70 // to always be visible or to only show them when not empty. | 74 // to always be visible or to only show them when not empty. |
71 virtual bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) = 0; | 75 virtual bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) = 0; |
72 | 76 |
73 // Wrapper around RecordAction defined in base/metrics/user_metrics.h | 77 // Wrapper around RecordAction defined in base/metrics/user_metrics.h |
74 // that ensure that the action is posted from the correct thread. | 78 // that ensure that the action is posted from the correct thread. |
75 virtual void RecordAction(const base::UserMetricsAction& action) = 0; | 79 virtual void RecordAction(const base::UserMetricsAction& action) = 0; |
76 | 80 |
77 // Returns a task that will be used to load any additional root nodes. This | 81 // Returns a task that will be used to load any additional root nodes. This |
78 // task will be invoked in the Profile's IO task runner. | 82 // task will be invoked in the Profile's IO task runner. |
79 virtual LoadExtraCallback GetLoadExtraNodesCallback() = 0; | 83 virtual LoadExtraCallback GetLoadExtraNodesCallback() = 0; |
80 | 84 |
81 // Returns true if the |permanent_node| can have its title updated. | 85 // Returns true if the |permanent_node| can have its title updated. |
82 virtual bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) = 0; | 86 virtual bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) = 0; |
83 | 87 |
84 // Returns true if |node| should sync. | 88 // Returns true if |node| should sync. |
85 virtual bool CanSyncNode(const BookmarkNode* node) = 0; | 89 virtual bool CanSyncNode(const BookmarkNode* node) = 0; |
86 | 90 |
87 // Returns true if this node can be edited by the user. | 91 // Returns true if this node can be edited by the user. |
88 // TODO(joaodasilva): the model should check this more aggressively, and | 92 // TODO(joaodasilva): the model should check this more aggressively, and |
89 // should give the client a means to temporarily disable those checks. | 93 // should give the client a means to temporarily disable those checks. |
90 // http://crbug.com/49598 | 94 // http://crbug.com/49598 |
91 virtual bool CanBeEditedByUser(const BookmarkNode* node) = 0; | 95 virtual bool CanBeEditedByUser(const BookmarkNode* node) = 0; |
92 }; | 96 }; |
93 | 97 |
94 } // namespace bookmarks | 98 } // namespace bookmarks |
95 | 99 |
96 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ | 100 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_ |
OLD | NEW |