bookmark_undo_provider.h 858 B

1234567891011121314151617181920212223242526272829
  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.
  4. #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_PROVIDER_H_
  5. #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_PROVIDER_H_
  6. #include <memory>
  7. namespace bookmarks {
  8. class BookmarkNode;
  9. // The interface for providing undo support.
  10. class BookmarkUndoProvider {
  11. public:
  12. // Restores the previously removed |node| at |parent| in the specified
  13. // |index|.
  14. virtual void RestoreRemovedNode(const BookmarkNode* parent,
  15. size_t index,
  16. std::unique_ptr<BookmarkNode> node) = 0;
  17. protected:
  18. virtual ~BookmarkUndoProvider() {}
  19. };
  20. } // namespace bookmarks
  21. #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UNDO_PROVIDER_H_