OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_DELEGATE_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_DELEGATE_H_ |
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_DELEGATE_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
9 | 9 |
10 namespace bookmarks { | 10 namespace bookmarks { |
11 | 11 |
12 class BookmarkModel; | 12 class BookmarkModel; |
13 class BookmarkNode; | 13 class BookmarkNode; |
14 class BookmarkUndoProvider; | 14 class BookmarkUndoProvider; |
15 | 15 |
16 // Delegate to handle bookmark change events in order to support undo when | 16 // Delegate to handle bookmark change events in order to support undo when |
17 // requested. | 17 // requested. |
18 class BookmarkUndoDelegate { | 18 class BookmarkUndoDelegate { |
19 public: | 19 public: |
20 virtual ~BookmarkUndoDelegate() {} | 20 virtual ~BookmarkUndoDelegate() {} |
21 | 21 |
22 // Sets the provider that will do the undo work. | 22 // Sets the provider that will do the undo work. |
23 virtual void SetUndoProvider(BookmarkUndoProvider* provider) = 0; | 23 virtual void SetUndoProvider(BookmarkUndoProvider* provider) = 0; |
24 | 24 |
25 // Called when |node| was removed from |parent| at position |index|. | 25 // Called when |node| was removed from |parent| at position |index|. |
26 virtual void OnBookmarkNodeRemoved(BookmarkModel* model, | 26 virtual void OnBookmarkNodeRemoved(BookmarkModel* model, |
27 const BookmarkNode* parent, | 27 const BookmarkNode* parent, |
28 int index, | 28 int index, |
29 scoped_ptr<BookmarkNode> node) = 0; | 29 std::unique_ptr<BookmarkNode> node) = 0; |
30 }; | 30 }; |
31 | 31 |
32 | 32 |
33 } // namespace bookmarks | 33 } // namespace bookmarks |
34 | 34 |
35 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_DELEGATE_H_ | 35 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_DELEGATE_H_ |
OLD | NEW |