OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BOOKMARK_BAR_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARK_BAR_MODEL_H_ |
6 #define CHROME_BROWSER_BOOKMARK_BAR_MODEL_H_ | 6 #define CHROME_BROWSER_BOOKMARK_BAR_MODEL_H_ |
7 | 7 |
8 #include "base/lock.h" | 8 #include "base/lock.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/scoped_handle.h" | 10 #include "base/scoped_handle.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // BookmarkBarModelObserver --------------------------------------------------- | 122 // BookmarkBarModelObserver --------------------------------------------------- |
123 | 123 |
124 // Observer for the BookmarkBarModel. | 124 // Observer for the BookmarkBarModel. |
125 // | 125 // |
126 class BookmarkBarModelObserver { | 126 class BookmarkBarModelObserver { |
127 public: | 127 public: |
128 // Invoked when the model has finished loading. | 128 // Invoked when the model has finished loading. |
129 virtual void Loaded(BookmarkBarModel* model) = 0; | 129 virtual void Loaded(BookmarkBarModel* model) = 0; |
130 | 130 |
| 131 // Invoked from the destructor of the BookmarkBarModel. |
| 132 virtual void BookmarkModelBeingDeleted(BookmarkBarModel* model) { } |
| 133 |
131 // Invoked when a node has moved. | 134 // Invoked when a node has moved. |
132 virtual void BookmarkNodeMoved(BookmarkBarModel* model, | 135 virtual void BookmarkNodeMoved(BookmarkBarModel* model, |
133 BookmarkBarNode* old_parent, | 136 BookmarkBarNode* old_parent, |
134 int old_index, | 137 int old_index, |
135 BookmarkBarNode* new_parent, | 138 BookmarkBarNode* new_parent, |
136 int new_index) = 0; | 139 int new_index) = 0; |
137 | 140 |
138 // Invoked when a node has been added. | 141 // Invoked when a node has been added. |
139 virtual void BookmarkNodeAdded(BookmarkBarModel* model, | 142 virtual void BookmarkNodeAdded(BookmarkBarModel* model, |
140 BookmarkBarNode* parent, | 143 BookmarkBarNode* parent, |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 bool waiting_for_history_load_; | 427 bool waiting_for_history_load_; |
425 | 428 |
426 // Handle to event signaled when loading is done. | 429 // Handle to event signaled when loading is done. |
427 ScopedHandle loaded_signal_; | 430 ScopedHandle loaded_signal_; |
428 | 431 |
429 DISALLOW_EVIL_CONSTRUCTORS(BookmarkBarModel); | 432 DISALLOW_EVIL_CONSTRUCTORS(BookmarkBarModel); |
430 }; | 433 }; |
431 | 434 |
432 #endif // CHROME_BROWSER_BOOKMARK_BAR_MODEL_H_ | 435 #endif // CHROME_BROWSER_BOOKMARK_BAR_MODEL_H_ |
433 | 436 |
OLD | NEW |