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_
11 #include "base/deferred_sequenced_task_runner.h"
12 #include "base/macros.h"
13 #include "components/bookmarks/browser/bookmark_client.h"
25 class BookmarkPermanentNode
;
26 class ManagedBookmarkService
;
29 class ChromeBookmarkClient
: public bookmarks::BookmarkClient
{
33 bookmarks::ManagedBookmarkService
* managed_bookmark_service
);
34 ~ChromeBookmarkClient() override
;
36 void Init(bookmarks::BookmarkModel
* model
);
39 void Shutdown() override
;
41 // bookmarks::BookmarkClient:
42 bool PreferTouchIcon() override
;
43 base::CancelableTaskTracker::TaskId
GetFaviconImageForPageURL(
45 favicon_base::IconType type
,
46 const favicon_base::FaviconImageCallback
& callback
,
47 base::CancelableTaskTracker
* tracker
) override
;
48 bool SupportsTypedCountForNodes() override
;
49 void GetTypedCountForNodes(
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
;
62 // Pointer to the associated Profile. Must outlive ChromeBookmarkClient.
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_