roll libyuv from 1483 to 1487
[chromium-blink-merge.git] / ios / chrome / browser / bookmarks / bookmark_client_impl.h
blobac5aba21c4dbc2161f7f1c5fe7024f6f135635b6
1 // Copyright 2015 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 IOS_CHROME_BROWSER_BOOKMARKS_BOOKMARK_CLIENT_IMPL_H_
6 #define IOS_CHROME_BROWSER_BOOKMARKS_BOOKMARK_CLIENT_IMPL_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;
17 namespace base {
18 class ListValue;
21 namespace bookmarks {
22 class BookmarkModel;
23 class BookmarkNode;
24 class BookmarkPermanentNode;
25 class ManagedBookmarkService;
28 namespace ios {
29 class ChromeBrowserState;
32 class BookmarkClientImpl : public bookmarks::BookmarkClient {
33 public:
34 BookmarkClientImpl(
35 ios::ChromeBrowserState* browser_state,
36 bookmarks::ManagedBookmarkService* managed_bookmark_service);
37 ~BookmarkClientImpl() override;
39 void Init(bookmarks::BookmarkModel* bookmark_model);
41 // KeyedService:
42 void Shutdown() override;
44 // bookmarks::BookmarkClient:
45 bool PreferTouchIcon() override;
46 base::CancelableTaskTracker::TaskId GetFaviconImageForPageURL(
47 const GURL& page_url,
48 favicon_base::IconType type,
49 const favicon_base::FaviconImageCallback& callback,
50 base::CancelableTaskTracker* tracker) override;
51 bool SupportsTypedCountForNodes() override;
52 void GetTypedCountForNodes(
53 const NodeSet& nodes,
54 NodeTypedCountPairs* node_typed_count_pairs) override;
55 bool IsPermanentNodeVisible(
56 const bookmarks::BookmarkPermanentNode* node) override;
57 void RecordAction(const base::UserMetricsAction& action) override;
58 bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() override;
59 bool CanSetPermanentNodeTitle(
60 const bookmarks::BookmarkNode* permanent_node) override;
61 bool CanSyncNode(const bookmarks::BookmarkNode* node) override;
62 bool CanBeEditedByUser(const bookmarks::BookmarkNode* node) override;
64 private:
65 // Pointer to the associated ios::ChromeBrowserState. Must outlive
66 // BookmarkClientImpl.
67 ios::ChromeBrowserState* browser_state_;
69 // Pointer to the ManagedBookmarkService responsible for bookmark policy. May
70 // be null during testing.
71 bookmarks::ManagedBookmarkService* managed_bookmark_service_;
73 DISALLOW_COPY_AND_ASSIGN(BookmarkClientImpl);
76 #endif // IOS_CHROME_BROWSER_BOOKMARKS_BOOKMARK_CLIENT_IMPL_H_