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_UI_GTK_GLOBAL_BOOKMARK_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GLOBAL_BOOKMARK_MENU_H_ |
6 #define CHROME_BROWSER_UI_GTK_GLOBAL_BOOKMARK_MENU_H_ | 6 #define CHROME_BROWSER_UI_GTK_GLOBAL_BOOKMARK_MENU_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // Removes all bookmark entries from the bookmark menu in anticipation that | 72 // Removes all bookmark entries from the bookmark menu in anticipation that |
73 // we're about to do a rebuild. | 73 // we're about to do a rebuild. |
74 void ClearBookmarkMenu(); | 74 void ClearBookmarkMenu(); |
75 | 75 |
76 // Callback used in ClearBookmarkMenu(). | 76 // Callback used in ClearBookmarkMenu(). |
77 static void ClearBookmarkItemCallback(GtkWidget* menu_item, | 77 static void ClearBookmarkItemCallback(GtkWidget* menu_item, |
78 void* unused); | 78 void* unused); |
79 | 79 |
80 // NotificationObserver: | 80 // NotificationObserver: |
81 virtual void Observe(NotificationType type, | 81 virtual void Observe(int type, |
82 const NotificationSource& source, | 82 const NotificationSource& source, |
83 const NotificationDetails& details); | 83 const NotificationDetails& details); |
84 | 84 |
85 // BookmarkModelObserver: | 85 // BookmarkModelObserver: |
86 virtual void Loaded(BookmarkModel* model) OVERRIDE; | 86 virtual void Loaded(BookmarkModel* model) OVERRIDE; |
87 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE; | 87 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE; |
88 virtual void BookmarkNodeMoved(BookmarkModel* model, | 88 virtual void BookmarkNodeMoved(BookmarkModel* model, |
89 const BookmarkNode* old_parent, | 89 const BookmarkNode* old_parent, |
90 int old_index, | 90 int old_index, |
91 const BookmarkNode* new_parent, | 91 const BookmarkNode* new_parent, |
(...skipping 25 matching lines...) Expand all Loading... |
117 OwnedWidgetGtk bookmark_menu_; | 117 OwnedWidgetGtk bookmark_menu_; |
118 | 118 |
119 ScopedRunnableMethodFactory<GlobalBookmarkMenu> method_factory_; | 119 ScopedRunnableMethodFactory<GlobalBookmarkMenu> method_factory_; |
120 | 120 |
121 // In order to appropriately update items in the bookmark menu, without | 121 // In order to appropriately update items in the bookmark menu, without |
122 // forcing a rebuild, map the model's nodes to menu items. | 122 // forcing a rebuild, map the model's nodes to menu items. |
123 std::map<const BookmarkNode*, GtkWidget*> bookmark_nodes_; | 123 std::map<const BookmarkNode*, GtkWidget*> bookmark_nodes_; |
124 }; | 124 }; |
125 | 125 |
126 #endif // CHROME_BROWSER_UI_GTK_GLOBAL_BOOKMARK_MENU_H_ | 126 #endif // CHROME_BROWSER_UI_GTK_GLOBAL_BOOKMARK_MENU_H_ |
OLD | NEW |