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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test_helper.h

Issue 677533003: Changes BookmarkBarView to only create buttons as needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: really dont join Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 8 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
9 9
10 // Used to access private state of BookmarkBarView for testing. 10 // Used to access private state of BookmarkBarView for testing.
11 class BookmarkBarViewTestHelper { 11 class BookmarkBarViewTestHelper {
12 public: 12 public:
13 explicit BookmarkBarViewTestHelper(BookmarkBarView* bbv) : bbv_(bbv) {} 13 explicit BookmarkBarViewTestHelper(BookmarkBarView* bbv) : bbv_(bbv) {}
14 ~BookmarkBarViewTestHelper() {} 14 ~BookmarkBarViewTestHelper() {}
15 15
16 int GetBookmarkButtonCount() { return bbv_->GetBookmarkButtonCount(); } 16 int GetBookmarkButtonCount() { return bbv_->GetBookmarkButtonCount(); }
17 17
18 views::LabelButton* GetBookmarkButton(int index) {
19 return bbv_->GetBookmarkButton(index);
20 }
21
18 views::LabelButton* apps_page_shortcut() { return bbv_->apps_page_shortcut_; } 22 views::LabelButton* apps_page_shortcut() { return bbv_->apps_page_shortcut_; }
19 23
24 views::MenuButton* overflow_button() { return bbv_->overflow_button_; }
25
20 private: 26 private:
21 BookmarkBarView* bbv_; 27 BookmarkBarView* bbv_;
22 28
23 DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTestHelper); 29 DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTestHelper);
24 }; 30 };
25 31
26 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_ 32 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698