diff options
Diffstat (limited to 'chrome/browser/views')
| -rw-r--r-- | chrome/browser/views/bookmark_bar_view.cc | 12 | ||||
| -rw-r--r-- | chrome/browser/views/bookmark_bar_view.h | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc index b5a952f..fb9d579 100644 --- a/chrome/browser/views/bookmark_bar_view.cc +++ b/chrome/browser/views/bookmark_bar_view.cc @@ -1118,7 +1118,6 @@ void BookmarkBarView::Init() { SetContextMenuController(this); size_animation_.reset(new SlideAnimation(this)); - size_animation_->SetSlideDuration(4000); } MenuButton* BookmarkBarView::CreateOtherBookmarkedButton() { @@ -1166,6 +1165,17 @@ void BookmarkBarView::Loaded(BookmarkBarModel* model) { SchedulePaint(); } +void BookmarkBarView::BookmarkModelBeingDeleted(BookmarkBarModel* model) { + // The bookmark model should never be deleted before us. This code exists + // to check for regressions in shutdown code and not crash. + NOTREACHED(); + + // Do minimal cleanup, presumably we'll be deleted shortly. + NotifyModelChanged(); + model_->RemoveObserver(this); + model_ = NULL; +} + void BookmarkBarView::BookmarkNodeMoved(BookmarkBarModel* model, BookmarkBarNode* old_parent, int old_index, diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h index 507da5d..d48780c 100644 --- a/chrome/browser/views/bookmark_bar_view.h +++ b/chrome/browser/views/bookmark_bar_view.h @@ -216,6 +216,9 @@ class BookmarkBarView : public ChromeViews::View, // for each of the children of the root node from the model. virtual void Loaded(BookmarkBarModel* model); + // Invoked when the model is being deleted. + virtual void BookmarkModelBeingDeleted(BookmarkBarModel* model); + // Invokes added followed by removed. virtual void BookmarkNodeMoved(BookmarkBarModel* model, BookmarkBarNode* old_parent, |
