| 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 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // Updates the visibility of the apps shortcut based on the pref value. | 378 // Updates the visibility of the apps shortcut based on the pref value. |
| 379 void OnAppsPageShortcutVisibilityPrefChanged(); | 379 void OnAppsPageShortcutVisibilityPrefChanged(); |
| 380 | 380 |
| 381 void OnShowManagedBookmarksPrefChanged(); | 381 void OnShowManagedBookmarksPrefChanged(); |
| 382 | 382 |
| 383 void LayoutAndPaint() { | 383 void LayoutAndPaint() { |
| 384 Layout(); | 384 Layout(); |
| 385 SchedulePaint(); | 385 SchedulePaint(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 // Calculate and return the extra padding added to the preferred height if the |
| 389 // font is taller than normal. (eg. Hindi text). |
| 390 int GetExtraFontPadding() const; |
| 391 |
| 388 // Needed to react to kShowAppsShortcutInBookmarkBar changes. | 392 // Needed to react to kShowAppsShortcutInBookmarkBar changes. |
| 389 PrefChangeRegistrar profile_pref_registrar_; | 393 PrefChangeRegistrar profile_pref_registrar_; |
| 390 | 394 |
| 391 // Used for opening urls. | 395 // Used for opening urls. |
| 392 content::PageNavigator* page_navigator_; | 396 content::PageNavigator* page_navigator_; |
| 393 | 397 |
| 394 // BookmarkModel that owns the entries and folders that are shown in this | 398 // BookmarkModel that owns the entries and folders that are shown in this |
| 395 // view. This is owned by the Profile. | 399 // view. This is owned by the Profile. |
| 396 bookmarks::BookmarkModel* model_; | 400 bookmarks::BookmarkModel* model_; |
| 397 | 401 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 BookmarkBar::State bookmark_bar_state_; | 456 BookmarkBar::State bookmark_bar_state_; |
| 453 | 457 |
| 454 // Are we animating to or from the detached state? | 458 // Are we animating to or from the detached state? |
| 455 bool animating_detached_; | 459 bool animating_detached_; |
| 456 | 460 |
| 457 base::ObserverList<BookmarkBarViewObserver> observers_; | 461 base::ObserverList<BookmarkBarViewObserver> observers_; |
| 458 | 462 |
| 459 // Factory used to delay showing of the drop menu. | 463 // Factory used to delay showing of the drop menu. |
| 460 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_; | 464 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_; |
| 461 | 465 |
| 466 // Extra padding for the height when the font wants to be larger than normal. |
| 467 static int extra_font_padding_; |
| 468 |
| 462 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 469 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
| 463 }; | 470 }; |
| 464 | 471 |
| 465 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 472 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
| OLD | NEW |