OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" | 5 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 10 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "components/bookmarks/browser/bookmark_model.h" | 12 #include "components/bookmarks/browser/bookmark_model.h" |
13 | 13 |
14 using bookmarks::BookmarkModel; | 14 using bookmarks::BookmarkModel; |
| 15 using bookmarks::BookmarkNode; |
15 | 16 |
16 BookmarkBarBridge::BookmarkBarBridge(Profile* profile, | 17 BookmarkBarBridge::BookmarkBarBridge(Profile* profile, |
17 BookmarkBarController* controller, | 18 BookmarkBarController* controller, |
18 BookmarkModel* model) | 19 BookmarkModel* model) |
19 : controller_(controller), | 20 : controller_(controller), |
20 model_(model), | 21 model_(model), |
21 batch_mode_(false) { | 22 batch_mode_(false) { |
22 model_->AddObserver(this); | 23 model_->AddObserver(this); |
23 | 24 |
24 // Bookmark loading is async; it may may not have happened yet. | 25 // Bookmark loading is async; it may may not have happened yet. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 115 } |
115 | 116 |
116 void BookmarkBarBridge::ExtensiveBookmarkChangesEnded(BookmarkModel* model) { | 117 void BookmarkBarBridge::ExtensiveBookmarkChangesEnded(BookmarkModel* model) { |
117 batch_mode_ = false; | 118 batch_mode_ = false; |
118 [controller_ loaded:model]; | 119 [controller_ loaded:model]; |
119 } | 120 } |
120 | 121 |
121 void BookmarkBarBridge::OnExtraButtonsVisibilityChanged() { | 122 void BookmarkBarBridge::OnExtraButtonsVisibilityChanged() { |
122 [controller_ updateExtraButtonsVisibility]; | 123 [controller_ updateExtraButtonsVisibility]; |
123 } | 124 } |
OLD | NEW |