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_BOOKMARKS_BOOKMARK_BAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Helper function which generates GtkToolItems for |bookmark_toolbar_|. | 123 // Helper function which generates GtkToolItems for |bookmark_toolbar_|. |
124 void CreateAllBookmarkButtons(); | 124 void CreateAllBookmarkButtons(); |
125 | 125 |
126 // Sets the visibility of the instructional text based on whether there are | 126 // Sets the visibility of the instructional text based on whether there are |
127 // any bookmarks in the bookmark bar node. | 127 // any bookmarks in the bookmark bar node. |
128 void SetInstructionState(); | 128 void SetInstructionState(); |
129 | 129 |
130 // Sets the visibility of the overflow chevron. | 130 // Sets the visibility of the overflow chevron. |
131 void SetChevronState(); | 131 void SetChevronState(); |
132 | 132 |
| 133 // Shows or hides the other bookmarks button depending on whether there are |
| 134 // bookmarks in it. |
| 135 void UpdateOtherBookmarksVisibility(); |
| 136 |
133 // Helper function which destroys all the bookmark buttons in the GtkToolbar. | 137 // Helper function which destroys all the bookmark buttons in the GtkToolbar. |
134 void RemoveAllBookmarkButtons(); | 138 void RemoveAllBookmarkButtons(); |
135 | 139 |
136 // Returns the number of buttons corresponding to starred urls/folders. This | 140 // Returns the number of buttons corresponding to starred urls/folders. This |
137 // is equivalent to the number of children the bookmark bar node from the | 141 // is equivalent to the number of children the bookmark bar node from the |
138 // bookmark bar model has. | 142 // bookmark bar model has. |
139 int GetBookmarkButtonCount(); | 143 int GetBookmarkButtonCount(); |
140 | 144 |
141 // Set the appearance of the overflow button appropriately (either chromium | 145 // Set the appearance of the overflow button appropriately (either chromium |
142 // style or GTK style). | 146 // style or GTK style). |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // bookmarks when there are no bookmarks on the bookmark bar. | 338 // bookmarks when there are no bookmarks on the bookmark bar. |
335 scoped_ptr<BookmarkBarInstructionsGtk> instructions_gtk_; | 339 scoped_ptr<BookmarkBarInstructionsGtk> instructions_gtk_; |
336 | 340 |
337 // GtkToolbar which contains all the bookmark buttons. | 341 // GtkToolbar which contains all the bookmark buttons. |
338 OwnedWidgetGtk bookmark_toolbar_; | 342 OwnedWidgetGtk bookmark_toolbar_; |
339 | 343 |
340 // The button that shows extra bookmarks that don't fit on the bookmark | 344 // The button that shows extra bookmarks that don't fit on the bookmark |
341 // bar. | 345 // bar. |
342 GtkWidget* overflow_button_; | 346 GtkWidget* overflow_button_; |
343 | 347 |
| 348 // A separator between the main bookmark bar area and |
| 349 // |other_bookmarks_button_|. |
| 350 GtkWidget* other_bookmarks_separator_; |
| 351 |
344 // The other bookmarks button. | 352 // The other bookmarks button. |
345 GtkWidget* other_bookmarks_button_; | 353 GtkWidget* other_bookmarks_button_; |
346 | 354 |
347 // The sync error button. | 355 // The sync error button. |
348 GtkWidget* sync_error_button_; | 356 GtkWidget* sync_error_button_; |
349 | 357 |
350 // A pointer to the ProfileSyncService instance if one exists. | 358 // A pointer to the ProfileSyncService instance if one exists. |
351 ProfileSyncService* sync_service_; | 359 ProfileSyncService* sync_service_; |
352 | 360 |
353 // The BookmarkNode from the model being dragged. NULL when we aren't | 361 // The BookmarkNode from the model being dragged. NULL when we aren't |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 BooleanPrefMember edit_bookmarks_enabled_; | 411 BooleanPrefMember edit_bookmarks_enabled_; |
404 | 412 |
405 ScopedRunnableMethodFactory<BookmarkBarGtk> method_factory_; | 413 ScopedRunnableMethodFactory<BookmarkBarGtk> method_factory_; |
406 | 414 |
407 BookmarkBar::State bookmark_bar_state_; | 415 BookmarkBar::State bookmark_bar_state_; |
408 | 416 |
409 DISALLOW_COPY_AND_ASSIGN(BookmarkBarGtk); | 417 DISALLOW_COPY_AND_ASSIGN(BookmarkBarGtk); |
410 }; | 418 }; |
411 | 419 |
412 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_GTK_H_ | 420 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_GTK_H_ |
OLD | NEW |