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

Side by Side Diff: components/offline_pages/offline_page_bookmark_bridge.h

Issue 1904613005: [Offline pages] Removing bookmarks dependency from offline pages component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests compilation Created 4 years, 8 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
« no previous file with comments | « components/offline_pages/DEPS ('k') | components/offline_pages/offline_page_bookmark_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_BRIDGE_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_BRIDGE_H_
7
8 #include <set>
9
10 #include "components/bookmarks/browser/base_bookmark_model_observer.h"
11
12 namespace offline_pages {
13
14 class OfflinePageModel;
15
16 // A bridge that adapts the bookmark observer to the OfflinePageModel
17 class OfflinePageBookmarkBridge : public bookmarks::BaseBookmarkModelObserver {
18 public:
19 // constructor, does not take ownership of either pointer.
20 OfflinePageBookmarkBridge(OfflinePageModel* model,
21 bookmarks::BookmarkModel* bookmark_model);
22
23 // Overridden from bookmarks::BaseBookmarkModelObserver
24 void BookmarkModelChanged() override;
25 // Invoked from the destructor of the BookmarkModel.
26 void BookmarkModelBeingDeleted(bookmarks::BookmarkModel* model) override;
27
28 void BookmarkNodeAdded(bookmarks::BookmarkModel* model,
29 const bookmarks::BookmarkNode* parent,
30 int index) override;
31 void BookmarkNodeRemoved(bookmarks::BookmarkModel* model,
32 const bookmarks::BookmarkNode* parent,
33 int old_index,
34 const bookmarks::BookmarkNode* node,
35 const std::set<GURL>& removed_urls) override;
36 void BookmarkNodeChanged(bookmarks::BookmarkModel* model,
37 const bookmarks::BookmarkNode* node) override;
38
39 private:
40 // Not owned.
41 OfflinePageModel* offline_model_;
42 bookmarks::BookmarkModel* bookmark_model_;
43 DISALLOW_COPY_AND_ASSIGN(OfflinePageBookmarkBridge);
44 };
45 } // namespace offline_pages
46 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/offline_pages/DEPS ('k') | components/offline_pages/offline_page_bookmark_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698