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