diff options
author | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-02 20:49:45 +0000 |
---|---|---|
committer | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-02 20:49:45 +0000 |
commit | ad573f16ef06760e855f3e13ad0902d19449cbd6 (patch) | |
tree | 6217bcdb61c5f54758f2cb606bb2aa4ff97ad3c1 /chrome/browser/views/bookmark_bar_view.h | |
parent | a9d589c3000d0e72f32dcd47842374d306e29176 (diff) | |
download | chromium_src-ad573f16ef06760e855f3e13ad0902d19449cbd6.zip chromium_src-ad573f16ef06760e855f3e13ad0902d19449cbd6.tar.gz chromium_src-ad573f16ef06760e855f3e13ad0902d19449cbd6.tar.bz2 |
Infrastructure to allow putting Extension Shelf on top along with Bookmarks.
BUG=http://code.google.com/p/chromium/issues/detail?id=20517
TEST=none
Review URL: http://codereview.chromium.org/173613
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.h')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h index caca1aa..4cb02f8 100644 --- a/chrome/browser/views/bookmark_bar_view.h +++ b/chrome/browser/views/bookmark_bar_view.h @@ -95,7 +95,6 @@ class BookmarkBarView : public views::View, virtual void DidChangeBounds(const gfx::Rect& previous, const gfx::Rect& current); virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); - virtual void Paint(gfx::Canvas* canvas); virtual void PaintChildren(gfx::Canvas* canvas); virtual bool GetDropFormats( int* formats, @@ -109,6 +108,9 @@ 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. @@ -192,16 +194,15 @@ class BookmarkBarView : public views::View, // If true we're running tests. This short circuits a couple of animations. static bool testing_; + // Constants used in Browser View, as well as here. + // How inset the bookmarks bar is when displayed on the new tab page. + static const int kNewtabHorizontalPadding; + static const int kNewtabVerticalPadding; + private: class ButtonSeparatorView; struct DropInfo; - // Paint the theme background with the proper alignment. - void PaintThemeBackgroundTopAligned(gfx::Canvas* canvas, - SkBitmap* ntp_background, int tiling, int alignment); - void PaintThemeBackgroundBottomAligned(gfx::Canvas* canvas, - SkBitmap* ntp_background, int tiling, int alignment); - // Task that invokes ShowDropFolderForNode when run. ShowFolderDropMenuTask // deletes itself once run. class ShowFolderDropMenuTask : public Task { @@ -396,6 +397,12 @@ class BookmarkBarView : public views::View, // Updates the colors for all the buttons in the bookmarks bar. void UpdateButtonColors(); + // This method computes the bounds for the bookmark bar items. If + // |compute_bounds_only| = TRUE, the bounds for the items are just computed, + // but are not set. This mode is used by GetPreferredSize() to obtain the + // desired bounds. If |compute_bounds_only| = FALSE, the bounds are set. + gfx::Size LayoutItems(bool compute_bounds_only); + #ifdef CHROME_PERSONALIZATION // Determines whether the sync error button should appear on the bookmarks // bar. @@ -404,7 +411,6 @@ class BookmarkBarView : public views::View, // Creates the sync error button and adds it as a child view. views::TextButton* CreateSyncErrorButton(); #endif - NotificationRegistrar registrar_; Profile* profile_; @@ -454,7 +460,7 @@ class BookmarkBarView : public views::View, ButtonSeparatorView* bookmarks_separator_view_; - // Owning browser. This is NULL duing testing. + // Owning browser. This is NULL during testing. Browser* browser_; // Animation controlling showing and hiding of the bar. |