| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 bool is_favicon_loaded() const { return is_favicon_loaded_; } | 103 bool is_favicon_loaded() const { return is_favicon_loaded_; } |
| 104 void set_is_favicon_loaded(bool loaded) { is_favicon_loaded_ = loaded; } | 104 void set_is_favicon_loaded(bool loaded) { is_favicon_loaded_ = loaded; } |
| 105 | 105 |
| 106 HistoryService::Handle favicon_load_handle() const { | 106 HistoryService::Handle favicon_load_handle() const { |
| 107 return favicon_load_handle_; | 107 return favicon_load_handle_; |
| 108 } | 108 } |
| 109 void set_favicon_load_handle(HistoryService::Handle handle) { | 109 void set_favicon_load_handle(HistoryService::Handle handle) { |
| 110 favicon_load_handle_ = handle; | 110 favicon_load_handle_ = handle; |
| 111 } | 111 } |
| 112 | 112 |
| 113 // Accessor method for controlling the visibility of a bookmark node/sub-tree. |
| 114 // Note that visibility is not propagated down the tree hierarchy so if a |
| 115 // parent node is marked as invisible, a child node may return "Visible". This |
| 116 // function is primarily useful when traversing the model to generate a UI |
| 117 // representation but we may want to suppress some nodes. |
| 118 virtual bool IsVisible() const; |
| 119 |
| 113 // TODO(sky): Consider adding last visit time here, it'll greatly simplify | 120 // TODO(sky): Consider adding last visit time here, it'll greatly simplify |
| 114 // HistoryContentsProvider. | 121 // HistoryContentsProvider. |
| 115 | 122 |
| 116 private: | 123 private: |
| 117 friend class BookmarkModel; | 124 friend class BookmarkModel; |
| 118 | 125 |
| 119 // A helper function to initialize various fields during construction. | 126 // A helper function to initialize various fields during construction. |
| 120 void Initialize(int64 id); | 127 void Initialize(int64 id); |
| 121 | 128 |
| 122 // Called when the favicon becomes invalid. | 129 // Called when the favicon becomes invalid. |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 scoped_ptr<BookmarkIndex> index_; | 455 scoped_ptr<BookmarkIndex> index_; |
| 449 | 456 |
| 450 base::WaitableEvent loaded_signal_; | 457 base::WaitableEvent loaded_signal_; |
| 451 | 458 |
| 452 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; | 459 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
| 453 | 460 |
| 454 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 461 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
| 455 }; | 462 }; |
| 456 | 463 |
| 457 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 464 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| OLD | NEW |