Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4275)

Unified Diff: chrome/browser/views/bookmark_bar_view.h

Issue 204022: ExtensionShelf now uses the BookmarkExtensionBackground, just like the Bookma... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/extensions_toolstrip.css ('k') | chrome/browser/views/bookmark_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/resources/extensions_toolstrip.css ('k') | chrome/browser/views/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698