diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 16:40:57 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 16:40:57 +0000 |
commit | 4d0cd7ce8c91a2c0157ecf9e0a5153712ff43d10 (patch) | |
tree | eff001f3129de849da6e8658d45072c2ccf494f6 /chrome/browser/views/bookmark_bar_view.h | |
parent | 50f2f629605750f033ef3c766498e42783a785f6 (diff) | |
download | chromium_src-4d0cd7ce8c91a2c0157ecf9e0a5153712ff43d10.zip chromium_src-4d0cd7ce8c91a2c0157ecf9e0a5153712ff43d10.tar.gz chromium_src-4d0cd7ce8c91a2c0157ecf9e0a5153712ff43d10.tar.bz2 |
A set of tests to exercise chrome menus as well as parts of bookmark
bar view. These are disabled until we straighten out the buildbot that
is always logged in.
BUG=1318922
TEST=this is just a bunch of tests.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@654 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 | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h index b8ffa37..287f8d7 100644 --- a/chrome/browser/views/bookmark_bar_view.h +++ b/chrome/browser/views/bookmark_bar_view.h @@ -52,6 +52,10 @@ class ButtonSeparatorView; struct DropInfo; } +namespace ChromeViews { +class MenuItemView; +} + // BookmarkBarView renders the BookmarkBarModel. Each starred entry // on the BookmarkBar is rendered as a MenuButton. An additional // MenuButton aligned to the right allows the user to quickly see @@ -143,9 +147,33 @@ class BookmarkBarView : public ChromeViews::View, void AnimationProgressed(const Animation* animation); void AnimationEnded(const Animation* animation); + // Returns the button at the specified index. + ChromeViews::TextButton* GetBookmarkButton(int index); + + // Returns the button responsible for showing bookmarks in the other bookmark + // folder. + ChromeViews::TextButton* other_bookmarked_button() const { + return other_bookmarked_button_; + } + + // Returns the active MenuItemView, or NULL if a menu isn't showing. + ChromeViews::MenuItemView* GetMenu(); + + // Returns the drop MenuItemView, or NULL if a menu isn't showing. + ChromeViews::MenuItemView* GetDropMenu(); + + // Returns the context menu, or null if one isn't showing. + ChromeViews::MenuItemView* GetContextMenu(); + + // Returns the button used when not all the items on the bookmark bar fit. + ChromeViews::TextButton* overflow_button() const { return overflow_button_; } + // Maximum size of buttons on the bookmark bar. static const int kMaxButtonWidth; + // If true we're running tests. This short circuits a couple of animations. + static bool testing_; + private: // Task that invokes ShowDropFolderForNode when run. ShowFolderDropMenuTask // deletes itself once run. @@ -192,9 +220,6 @@ class BookmarkBarView : public ChromeViews::View, // bookmark bar model has. int GetBookmarkButtonCount(); - // Returns the button at the specified index. - ChromeViews::TextButton* GetBookmarkButton(int index); - // Invoked when the bookmark bar model has finished loading. Creates a button // for each of the children of the root node from the model. virtual void Loaded(BookmarkBarModel* model); @@ -404,7 +429,7 @@ class BookmarkBarView : public ChromeViews::View, ButtonSeparatorView* bookmarks_separator_view_; - // Owning browser. + // Owning browser. This is NULL duing testing. Browser* browser_; // Animation controlling showing and hiding of the bar. |