OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_VIEW_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 @class BookmarkMenuItem; |
| 11 @class BookmarkMenuView; |
| 12 |
| 13 namespace ios { |
| 14 class ChromeBrowserState; |
| 15 } // namespace ios |
| 16 |
| 17 @protocol BookmarkMenuViewDelegate |
| 18 - (void)bookmarkMenuView:(BookmarkMenuView*)view |
| 19 selectedMenuItem:(BookmarkMenuItem*)menuItem; |
| 20 @end |
| 21 |
| 22 // This view consists of a table view that shows all the relevant menu items. |
| 23 @interface BookmarkMenuView : UIView |
| 24 |
| 25 @property(nonatomic, assign) id<BookmarkMenuViewDelegate> delegate; |
| 26 @property(nonatomic, readonly) BookmarkMenuItem* defaultMenuItem; |
| 27 |
| 28 // Designated initializer. |
| 29 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState |
| 30 frame:(CGRect)frame; |
| 31 // The primary menu item is blue instead of gray. |
| 32 - (void)updatePrimaryMenuItem:(BookmarkMenuItem*)menuItem; |
| 33 // Applies |scrollsToTop| to the menu view. |
| 34 - (void)setScrollsToTop:(BOOL)scrollsToTop; |
| 35 |
| 36 @end |
| 37 |
| 38 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_VIEW_H_ |
OLD | NEW |