| 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 // C++ bridge class between Chromium and Cocoa to connect the | 5 // C++ bridge class between Chromium and Cocoa to connect the |
| 6 // Bookmarks (model) with the Bookmark Bar (view). | 6 // Bookmarks (model) with the Bookmark Bar (view). |
| 7 // | 7 // |
| 8 // There is exactly one BookmarkBarBridge per BookmarkBarController / | 8 // There is exactly one BookmarkBarBridge per BookmarkBarController / |
| 9 // BrowserWindowController / Browser. | 9 // BrowserWindowController / Browser. |
| 10 | 10 |
| 11 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_BRIDGE_H_ | 11 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_BRIDGE_H_ |
| 12 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_BRIDGE_H_ | 12 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_BRIDGE_H_ |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/prefs/pref_change_registrar.h" | 16 #include "base/prefs/pref_change_registrar.h" |
| 17 #include "components/bookmarks/browser/bookmark_model_observer.h" | 17 #include "components/bookmarks/browser/bookmark_model_observer.h" |
| 18 | 18 |
| 19 class Profile; | 19 class Profile; |
| 20 @class BookmarkBarController; | 20 @class BookmarkBarController; |
| 21 | 21 |
| 22 class BookmarkBarBridge : public BookmarkModelObserver { | 22 class BookmarkBarBridge : public bookmarks::BookmarkModelObserver { |
| 23 public: | 23 public: |
| 24 BookmarkBarBridge(Profile* profile, | 24 BookmarkBarBridge(Profile* profile, |
| 25 BookmarkBarController* controller, | 25 BookmarkBarController* controller, |
| 26 BookmarkModel* model); | 26 BookmarkModel* model); |
| 27 ~BookmarkBarBridge() override; | 27 ~BookmarkBarBridge() override; |
| 28 | 28 |
| 29 // Overridden from BookmarkModelObserver: | 29 // bookmarks::BookmarkModelObserver: |
| 30 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; | 30 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; |
| 31 void BookmarkModelBeingDeleted(BookmarkModel* model) override; | 31 void BookmarkModelBeingDeleted(BookmarkModel* model) override; |
| 32 void BookmarkNodeMoved(BookmarkModel* model, | 32 void BookmarkNodeMoved(BookmarkModel* model, |
| 33 const BookmarkNode* old_parent, | 33 const BookmarkNode* old_parent, |
| 34 int old_index, | 34 int old_index, |
| 35 const BookmarkNode* new_parent, | 35 const BookmarkNode* new_parent, |
| 36 int new_index) override; | 36 int new_index) override; |
| 37 void BookmarkNodeAdded(BookmarkModel* model, | 37 void BookmarkNodeAdded(BookmarkModel* model, |
| 38 const BookmarkNode* parent, | 38 const BookmarkNode* parent, |
| 39 int index) override; | 39 int index) override; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 62 PrefChangeRegistrar profile_pref_registrar_; | 62 PrefChangeRegistrar profile_pref_registrar_; |
| 63 | 63 |
| 64 // Updates the visibility of the apps shortcut and the managed bookmarks | 64 // Updates the visibility of the apps shortcut and the managed bookmarks |
| 65 // folder based on the pref values. | 65 // folder based on the pref values. |
| 66 void OnExtraButtonsVisibilityChanged(); | 66 void OnExtraButtonsVisibilityChanged(); |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(BookmarkBarBridge); | 68 DISALLOW_COPY_AND_ASSIGN(BookmarkBarBridge); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_BRIDGE_H_ | 71 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_BRIDGE_H_ |
| OLD | NEW |