summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_bar_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.h')
-rw-r--r--chrome/browser/views/bookmark_bar_view.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h
index 06b44f2..20fcc07 100644
--- a/chrome/browser/views/bookmark_bar_view.h
+++ b/chrome/browser/views/bookmark_bar_view.h
@@ -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 @@ class MenuItemView;
// 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 @@ class BookmarkBarView : public views::View,
// 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 @@ class BookmarkBarView : public views::View,
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 @@ class BookmarkBarView : public views::View,
// 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.