Index: chrome/browser/views/bookmark_bar_view.h |
=================================================================== |
--- chrome/browser/views/bookmark_bar_view.h (revision 26222) |
+++ chrome/browser/views/bookmark_bar_view.h (working copy) |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/extensions/extensions_service.h" |
#include "chrome/browser/sync/profile_sync_service.h" |
#include "chrome/browser/views/bookmark_menu_controller_views.h" |
+#include "chrome/browser/views/detachable_toolbar_view.h" |
#include "chrome/common/notification_registrar.h" |
#include "views/controls/button/menu_button.h" |
#include "views/controls/label.h" |
@@ -33,7 +34,7 @@ |
// BookmarkBarView shows the bookmarks from a specific Profile. BookmarkBarView |
// waits until the HistoryService for the profile has been loaded before |
// creating the BookmarkModel. |
-class BookmarkBarView : public views::View, |
+class BookmarkBarView : public DetachableToolbarView, |
#ifdef CHROME_PERSONALIZATION |
public ProfileSyncServiceObserver, |
#endif |
@@ -88,6 +89,13 @@ |
// the bookmark bar. |
void SetPageNavigator(PageNavigator* navigator); |
+ // DetachableToolbarView methods: |
+ virtual bool IsDetached() const; |
+ virtual bool IsOnTop() const; |
+ virtual double GetAnimationValue() const { |
+ return size_animation_->GetCurrentValue(); |
+ } |
+ |
// View methods: |
virtual gfx::Size GetPreferredSize(); |
virtual gfx::Size GetMinimumSize(); |
@@ -108,9 +116,6 @@ |
virtual bool GetAccessibleName(std::wstring* name); |
virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
virtual void SetAccessibleName(const std::wstring& name); |
- double GetSizeAnimationValue() const { |
- return size_animation_->GetCurrentValue(); |
- } |
#ifdef CHROME_PERSONALIZATION |
// ProfileSyncServiceObserver method. |
@@ -143,15 +148,11 @@ |
// Returns the model. |
BookmarkModel* GetModel() { return model_; } |
- // Returns true if the bookmark bar is drawn detached from the toolbar. This |
- // can only be true when OnNewTabPage() is true (see below). |
- bool IsDetachedStyle(); |
- |
// Returns true if the bookmarks bar preference is set to 'always show'. |
- bool IsAlwaysShown(); |
+ bool IsAlwaysShown() const; |
// True if we're on a page where the bookmarks bar is always visible. |
- bool OnNewTabPage(); |
+ bool OnNewTabPage() const; |
// How much we want the bookmark bar to overlap the toolbar. If |return_max| |
// is true, we return the maximum overlap rather than the current overlap. |