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 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 const BookmarkNode* parent, | 350 const BookmarkNode* parent, |
351 int old_index); | 351 int old_index); |
352 | 352 |
353 // Updates the colors for all the child objects in the bookmarks bar. | 353 // Updates the colors for all the child objects in the bookmarks bar. |
354 void UpdateColors(); | 354 void UpdateColors(); |
355 | 355 |
356 // Updates the visibility of |other_bookmarked_button_|. Also shows or hide | 356 // Updates the visibility of |other_bookmarked_button_|. Also shows or hide |
357 // the separator if required. | 357 // the separator if required. |
358 void UpdateOtherBookmarksVisibility(); | 358 void UpdateOtherBookmarksVisibility(); |
359 | 359 |
| 360 // Updates the visibility of |apps_page_shortcut_|. Also shows or hide the |
| 361 // separator if required. |
| 362 void UpdateAppsPageShortcutVisibility(); |
| 363 |
360 // Updates the visibility of |bookmarks_separator_view_|. | 364 // Updates the visibility of |bookmarks_separator_view_|. |
361 void UpdateBookmarksSeparatorVisibility(); | 365 void UpdateBookmarksSeparatorVisibility(); |
362 | 366 |
363 // This method computes the bounds for the bookmark bar items. If | 367 // This method computes the bounds for the bookmark bar items. If |
364 // |compute_bounds_only| = TRUE, the bounds for the items are just computed, | 368 // |compute_bounds_only| = TRUE, the bounds for the items are just computed, |
365 // but are not set. This mode is used by GetPreferredSize() to obtain the | 369 // but are not set. This mode is used by GetPreferredSize() to obtain the |
366 // desired bounds. If |compute_bounds_only| = FALSE, the bounds are set. | 370 // desired bounds. If |compute_bounds_only| = FALSE, the bounds are set. |
367 gfx::Size LayoutItems(bool compute_bounds_only); | 371 gfx::Size LayoutItems(bool compute_bounds_only); |
368 | 372 |
369 // Returns true if we should show the apps shortcut. | |
370 bool ShouldShowAppsShortcut() const; | |
371 | |
372 // Updates the visibility of the apps shortcut based on the pref value. | 373 // Updates the visibility of the apps shortcut based on the pref value. |
373 void OnAppsPageShortcutVisibilityChanged(); | 374 void OnAppsPageShortcutVisibilityChanged(); |
374 | 375 |
375 // Needed to react to kShowAppsShortcutInBookmarkBar changes. | 376 // Needed to react to kShowAppsShortcutInBookmarkBar changes. |
376 PrefChangeRegistrar profile_pref_registrar_; | 377 PrefChangeRegistrar profile_pref_registrar_; |
377 | 378 |
378 // Used for opening urls. | 379 // Used for opening urls. |
379 content::PageNavigator* page_navigator_; | 380 content::PageNavigator* page_navigator_; |
380 | 381 |
381 // Model providing details as to the starred entries/folders that should be | 382 // Model providing details as to the starred entries/folders that should be |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 433 |
433 BookmarkBar::State bookmark_bar_state_; | 434 BookmarkBar::State bookmark_bar_state_; |
434 | 435 |
435 // Are we animating to or from the detached state? | 436 // Are we animating to or from the detached state? |
436 bool animating_detached_; | 437 bool animating_detached_; |
437 | 438 |
438 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 439 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
439 }; | 440 }; |
440 | 441 |
441 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 442 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
OLD | NEW |