OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 9 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
9 | 10 |
10 // Used to access private state of BookmarkBarView for testing. | 11 // Used to access private state of BookmarkBarView for testing. |
11 class BookmarkBarViewTestHelper { | 12 class BookmarkBarViewTestHelper { |
12 public: | 13 public: |
13 explicit BookmarkBarViewTestHelper(BookmarkBarView* bbv) : bbv_(bbv) {} | 14 explicit BookmarkBarViewTestHelper(BookmarkBarView* bbv) : bbv_(bbv) {} |
14 ~BookmarkBarViewTestHelper() {} | 15 ~BookmarkBarViewTestHelper() {} |
15 | 16 |
16 int GetBookmarkButtonCount() { return bbv_->GetBookmarkButtonCount(); } | 17 int GetBookmarkButtonCount() { return bbv_->GetBookmarkButtonCount(); } |
17 | 18 |
18 views::LabelButton* GetBookmarkButton(int index) { | 19 views::LabelButton* GetBookmarkButton(int index) { |
19 return bbv_->GetBookmarkButton(index); | 20 return bbv_->GetBookmarkButton(index); |
20 } | 21 } |
21 | 22 |
22 views::LabelButton* apps_page_shortcut() { return bbv_->apps_page_shortcut_; } | 23 views::LabelButton* apps_page_shortcut() { return bbv_->apps_page_shortcut_; } |
23 | 24 |
24 views::MenuButton* overflow_button() { return bbv_->overflow_button_; } | 25 views::MenuButton* overflow_button() { return bbv_->overflow_button_; } |
25 | 26 |
26 private: | 27 private: |
27 BookmarkBarView* bbv_; | 28 BookmarkBarView* bbv_; |
28 | 29 |
29 DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTestHelper); | 30 DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTestHelper); |
30 }; | 31 }; |
31 | 32 |
32 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ | 33 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ |
OLD | NEW |