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

Side by Side Diff: ios/chrome/browser/ui/bookmarks/bookmark_menu_item.h

Issue 2662473003: Removing "All Bookmarks" (Closed)
Patch Set: feedback Created 3 years, 10 months 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 IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_ITEM_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_ITEM_H_
6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_ITEM_H_ 6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_ITEM_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 namespace bookmarks { 10 namespace bookmarks {
11 class BookmarkNode; 11 class BookmarkNode;
12 12
13 // The types get cached, which means that their values must not change. 13 // The types get cached, which means that their values must not change.
14 // 14 //
15 // This enum values are store on disk (see BookmarkPositionCache class) 15 // This enum values are store on disk (see BookmarkPositionCache class)
16 // and must not be changed. New values must be added at the end, and if 16 // and must not be changed. New values must be added at the end, and if
17 // a value is removed it should not be reused. 17 // a value is removed it should not be reused.
18 typedef enum { 18 typedef enum {
19 // Corresponds with the "all items" view.
20 MenuItemAll = 0,
21 // A very thin divider. 19 // A very thin divider.
22 MenuItemDivider = 1, 20 MenuItemDivider = 1,
23 // A BookmarkNode* that is a folder. 21 // A BookmarkNode* that is a folder.
24 MenuItemFolder = 2, 22 MenuItemFolder = 2,
25 // Section header. 23 // Section header.
26 MenuItemSectionHeader = 4, 24 MenuItemSectionHeader = 4,
27 MenuItemLast = MenuItemSectionHeader 25 MenuItemLast = MenuItemSectionHeader
28 } MenuItemType; 26 } MenuItemType;
29 27
30 BOOL NumberIsValidMenuItemType(int number); 28 BOOL NumberIsValidMenuItemType(int number);
(...skipping 13 matching lines...) Expand all
44 - (UIImage*)imagePrimary:(BOOL)primary; 42 - (UIImage*)imagePrimary:(BOOL)primary;
45 // Returns the height of the corresponding row in the menu. 43 // Returns the height of the corresponding row in the menu.
46 - (CGFloat)height; 44 - (CGFloat)height;
47 // Whether the row can be selected. 45 // Whether the row can be selected.
48 - (BOOL)canBeSelected; 46 - (BOOL)canBeSelected;
49 // Whether the view controller associated with this menu item supports editing. 47 // Whether the view controller associated with this menu item supports editing.
50 - (BOOL)supportsEditing; 48 - (BOOL)supportsEditing;
51 // Returns the menuitem located at the root ancestor of this item. 49 // Returns the menuitem located at the root ancestor of this item.
52 - (BookmarkMenuItem*)parentItem; 50 - (BookmarkMenuItem*)parentItem;
53 51
54 + (BookmarkMenuItem*)allMenuItem;
55 + (BookmarkMenuItem*)dividerMenuItem; 52 + (BookmarkMenuItem*)dividerMenuItem;
56 + (BookmarkMenuItem*)folderMenuItemForNode:(const bookmarks::BookmarkNode*)node 53 + (BookmarkMenuItem*)folderMenuItemForNode:(const bookmarks::BookmarkNode*)node
57 rootAncestor: 54 rootAncestor:
58 (const bookmarks::BookmarkNode*)ancestor; 55 (const bookmarks::BookmarkNode*)ancestor;
59 + (BookmarkMenuItem*)sectionMenuItemWithTitle:(NSString*)title; 56 + (BookmarkMenuItem*)sectionMenuItemWithTitle:(NSString*)title;
60 57
61 // |folder| is only valid if |type| == MenuItemFolder or MenuItemManaged. 58 // |folder| is only valid if |type| == MenuItemFolder or MenuItemManaged.
62 @property(nonatomic, assign, readonly) const bookmarks::BookmarkNode* folder; 59 @property(nonatomic, assign, readonly) const bookmarks::BookmarkNode* folder;
63 @property(nonatomic, assign, readonly) 60 @property(nonatomic, assign, readonly)
64 const bookmarks::BookmarkNode* rootAncestor; 61 const bookmarks::BookmarkNode* rootAncestor;
65 @property(nonatomic, assign, readonly) bookmarks::MenuItemType type; 62 @property(nonatomic, assign, readonly) bookmarks::MenuItemType type;
66 // |sectionTitle| is only valid if |type| == MenuItemSectionHeader. 63 // |sectionTitle| is only valid if |type| == MenuItemSectionHeader.
67 @property(nonatomic, copy, readonly) NSString* sectionTitle; 64 @property(nonatomic, copy, readonly) NSString* sectionTitle;
68 65
69 @end 66 @end
70 67
71 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_ITEM_H_ 68 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_MENU_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698