OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_MODEL_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // You should NOT directly create a BookmarkModel, instead go through the | 66 // You should NOT directly create a BookmarkModel, instead go through the |
67 // BookmarkModelFactory. | 67 // BookmarkModelFactory. |
68 class BookmarkModel : public BookmarkUndoProvider, | 68 class BookmarkModel : public BookmarkUndoProvider, |
69 public KeyedService { | 69 public KeyedService { |
70 public: | 70 public: |
71 struct URLAndTitle { | 71 struct URLAndTitle { |
72 GURL url; | 72 GURL url; |
73 base::string16 title; | 73 base::string16 title; |
74 }; | 74 }; |
75 | 75 |
| 76 static const int64_t BOOKMARKS_BAR_NODE_ID; |
| 77 static const int64_t OTHER_BOOKMARKS_NODE_ID; |
| 78 static const int64_t MOBILE_BOOKMARKS_NODE_ID; |
| 79 |
76 explicit BookmarkModel(std::unique_ptr<BookmarkClient> client); | 80 explicit BookmarkModel(std::unique_ptr<BookmarkClient> client); |
77 ~BookmarkModel() override; | 81 ~BookmarkModel() override; |
78 | 82 |
79 // KeyedService: | 83 // KeyedService: |
80 void Shutdown() override; | 84 void Shutdown() override; |
81 | 85 |
82 // Loads the bookmarks. This is called upon creation of the | 86 // Loads the bookmarks. This is called upon creation of the |
83 // BookmarkModel. You need not invoke this directly. | 87 // BookmarkModel. You need not invoke this directly. |
84 // All load operations will be executed on |io_task_runner| and the completion | 88 // All load operations will be executed on |io_task_runner| and the completion |
85 // callback will be called from |ui_task_runner|. | 89 // callback will be called from |ui_task_runner|. |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 467 |
464 BookmarkUndoDelegate* undo_delegate_; | 468 BookmarkUndoDelegate* undo_delegate_; |
465 std::unique_ptr<BookmarkUndoDelegate> empty_undo_delegate_; | 469 std::unique_ptr<BookmarkUndoDelegate> empty_undo_delegate_; |
466 | 470 |
467 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 471 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
468 }; | 472 }; |
469 | 473 |
470 } // namespace bookmarks | 474 } // namespace bookmarks |
471 | 475 |
472 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ | 476 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
OLD | NEW |