| 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_HOME_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_HOME_VIEW_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_HOME_VIEW_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_HOME_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h" | 8 #import "ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h" |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // DO NOT modify these two ivars directly. | 44 // DO NOT modify these two ivars directly. |
| 45 std::set<const bookmarks::BookmarkNode*> _editNodes; | 45 std::set<const bookmarks::BookmarkNode*> _editNodes; |
| 46 std::vector<const bookmarks::BookmarkNode*> _editNodesOrdered; | 46 std::vector<const bookmarks::BookmarkNode*> _editNodesOrdered; |
| 47 } | 47 } |
| 48 // Designated initializer. | 48 // Designated initializer. |
| 49 - (instancetype)initWithLoader:(id<UrlLoader>)loader | 49 - (instancetype)initWithLoader:(id<UrlLoader>)loader |
| 50 browserState:(ios::ChromeBrowserState*)browserState; | 50 browserState:(ios::ChromeBrowserState*)browserState; |
| 51 | 51 |
| 52 #pragma mark - Properties Relevant To Presenters | 52 #pragma mark - Properties Relevant To Presenters |
| 53 | 53 |
| 54 @property(nonatomic, assign) id<BookmarkHomeViewControllerDelegate> delegate; | 54 @property(nonatomic, weak) id<BookmarkHomeViewControllerDelegate> delegate; |
| 55 | 55 |
| 56 #pragma mark - Properties Relevant To Subclasses | 56 #pragma mark - Properties Relevant To Subclasses |
| 57 | 57 |
| 58 // Whether the view controller is in editing mode. | 58 // Whether the view controller is in editing mode. |
| 59 @property(nonatomic, assign, readonly) BOOL editing; | 59 @property(nonatomic, assign, readonly) BOOL editing; |
| 60 // The set of selected index paths for edition. | 60 // The set of selected index paths for edition. |
| 61 @property(nonatomic, retain, readonly) NSMutableArray* editIndexPaths; | 61 @property(nonatomic, strong, readonly) NSMutableArray* editIndexPaths; |
| 62 @property(nonatomic, assign, readonly) bookmarks::BookmarkModel* bookmarks; | 62 @property(nonatomic, assign, readonly) bookmarks::BookmarkModel* bookmarks; |
| 63 @property(nonatomic, assign, readonly) id<UrlLoader> loader; | 63 @property(nonatomic, weak, readonly) id<UrlLoader> loader; |
| 64 @property(nonatomic, assign, readonly) ios::ChromeBrowserState* browserState; | 64 @property(nonatomic, assign, readonly) ios::ChromeBrowserState* browserState; |
| 65 | 65 |
| 66 #pragma mark - Relevant Methods | 66 #pragma mark - Relevant Methods |
| 67 // Replaces |_editNodes| and |_editNodesOrdered| with new container objects. | 67 // Replaces |_editNodes| and |_editNodesOrdered| with new container objects. |
| 68 - (void)resetEditNodes; | 68 - (void)resetEditNodes; |
| 69 // Adds |node| and |indexPath| if it isn't already present. | 69 // Adds |node| and |indexPath| if it isn't already present. |
| 70 - (void)insertEditNode:(const bookmarks::BookmarkNode*)node | 70 - (void)insertEditNode:(const bookmarks::BookmarkNode*)node |
| 71 atIndexPath:(NSIndexPath*)indexPath; | 71 atIndexPath:(NSIndexPath*)indexPath; |
| 72 // Removes |node| and |indexPath| if it's present. | 72 // Removes |node| and |indexPath| if it's present. |
| 73 - (void)removeEditNode:(const bookmarks::BookmarkNode*)node | 73 - (void)removeEditNode:(const bookmarks::BookmarkNode*)node |
| (...skipping 10 matching lines...) Expand all Loading... |
| 84 - (void)dismissModals:(BOOL)animated; | 84 - (void)dismissModals:(BOOL)animated; |
| 85 | 85 |
| 86 @end | 86 @end |
| 87 | 87 |
| 88 @interface BookmarkHomeViewController (PrivateAPIExposedForTesting) | 88 @interface BookmarkHomeViewController (PrivateAPIExposedForTesting) |
| 89 - (const std::set<const bookmarks::BookmarkNode*>&)editNodes; | 89 - (const std::set<const bookmarks::BookmarkNode*>&)editNodes; |
| 90 - (void)setEditNodes:(const std::set<const bookmarks::BookmarkNode*>&)editNodes; | 90 - (void)setEditNodes:(const std::set<const bookmarks::BookmarkNode*>&)editNodes; |
| 91 @end | 91 @end |
| 92 | 92 |
| 93 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_HOME_VIEW_CONTROLLER_H_ | 93 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_HOME_VIEW_CONTROLLER_H_ |
| OLD | NEW |