Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: chrome/browser/bookmarks/chrome_bookmark_client.h

Issue 242693003: Introduce BookmarkClient interface to abstract embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work around STL android bug Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
6 #define CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
7
8 #include "base/compiler_specific.h"
9 #include "components/bookmarks/core/browser/bookmark_client.h"
10 #include "components/keyed_service/core/keyed_service.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13
14 class BookmarkModel;
15 class Profile;
16
17 class ChromeBookmarkClient : public BookmarkClient,
18 public content::NotificationObserver,
19 public KeyedService {
20 public:
21 // |index_urls| says whether URLs should be stored in the BookmarkIndex
22 // in addition to bookmark titles.
23 ChromeBookmarkClient(Profile* profile, bool index_urls);
24 virtual ~ChromeBookmarkClient();
25
26 // Returns the BookmarkModel that corresponds to this ChromeBookmarkClient.
27 BookmarkModel* model() { return model_.get(); }
28
29 // BookmarkClient:
30 virtual base::CancelableTaskTracker::TaskId GetFaviconImageForURL(
31 const GURL& page_url,
32 int icon_types,
33 int desired_size_in_dip,
34 const FaviconImageCallback& callback,
35 base::CancelableTaskTracker* tracker) OVERRIDE;
36 virtual bool SupportsTypedCountForNodes() OVERRIDE;
37 virtual void GetTypedCountForNodes(
38 const NodeSet& nodes,
39 NodeTypedCountPairs* node_typed_count_pairs) OVERRIDE;
40 virtual void RecordAction(const base::UserMetricsAction& action) OVERRIDE;
41 virtual void NotifyHistoryAboutRemovedBookmarks(
42 const std::set<GURL>& removed_bookmarks_urls) OVERRIDE;
43
44 // content::NotificationObserver:
45 virtual void Observe(int type,
46 const content::NotificationSource& source,
47 const content::NotificationDetails& details) OVERRIDE;
48
49 // KeyedService:
50 virtual void Shutdown() OVERRIDE;
51
52 private:
53 Profile* profile_;
54
55 content::NotificationRegistrar registrar_;
56
57 scoped_ptr<BookmarkModel> model_;
58
59 DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClient);
60 };
61
62 #endif // CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils_unittest.cc ('k') | chrome/browser/bookmarks/chrome_bookmark_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698