Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / bookmarks / chrome_bookmark_client.h
blob3fdde2cebc297ab2d950214d63353137dd9ab0f8
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 CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
6 #define CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
8 #include <set>
9 #include <vector>
11 #include "base/deferred_sequenced_task_runner.h"
12 #include "base/macros.h"
13 #include "components/bookmarks/browser/bookmark_client.h"
15 class GURL;
16 class Profile;
18 namespace base {
19 class ListValue;
22 namespace bookmarks {
23 class BookmarkModel;
24 class BookmarkNode;
25 class BookmarkPermanentNode;
26 class ManagedBookmarkService;
29 class ChromeBookmarkClient : public bookmarks::BookmarkClient {
30 public:
31 ChromeBookmarkClient(
32 Profile* profile,
33 bookmarks::ManagedBookmarkService* managed_bookmark_service);
34 ~ChromeBookmarkClient() override;
36 void Init(bookmarks::BookmarkModel* model);
38 // KeyedService:
39 void Shutdown() override;
41 // bookmarks::BookmarkClient:
42 bool PreferTouchIcon() override;
43 base::CancelableTaskTracker::TaskId GetFaviconImageForPageURL(
44 const GURL& page_url,
45 favicon_base::IconType type,
46 const favicon_base::FaviconImageCallback& callback,
47 base::CancelableTaskTracker* tracker) override;
48 bool SupportsTypedCountForNodes() override;
49 void GetTypedCountForNodes(
50 const NodeSet& nodes,
51 NodeTypedCountPairs* node_typed_count_pairs) override;
52 bool IsPermanentNodeVisible(
53 const bookmarks::BookmarkPermanentNode* node) override;
54 void RecordAction(const base::UserMetricsAction& action) override;
55 bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() override;
56 bool CanSetPermanentNodeTitle(
57 const bookmarks::BookmarkNode* permanent_node) override;
58 bool CanSyncNode(const bookmarks::BookmarkNode* node) override;
59 bool CanBeEditedByUser(const bookmarks::BookmarkNode* node) override;
61 private:
62 // Pointer to the associated Profile. Must outlive ChromeBookmarkClient.
63 Profile* profile_;
65 // Pointer to the ManagedBookmarkService responsible for bookmark policy. May
66 // be null during testing.
67 bookmarks::ManagedBookmarkService* managed_bookmark_service_;
69 DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClient);
72 #endif // CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_