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

Unified Diff: ios/chrome/browser/ui/bookmarks/bookmark_folder_editor_view_controller.h

Issue 2586993002: Upstream Chrome on iOS source code [3/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/bookmarks/bookmark_folder_editor_view_controller.h
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_folder_editor_view_controller.h b/ios/chrome/browser/ui/bookmarks/bookmark_folder_editor_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8eb1441555e1a19c8eb0f194f54aa22facad45b
--- /dev/null
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_folder_editor_view_controller.h
@@ -0,0 +1,64 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#ifndef IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_FOLDER_EDITOR_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_FOLDER_EDITOR_VIEW_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+#import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
+
+@class BookmarkFolderEditorViewController;
+
+namespace bookmarks {
+class BookmarkModel;
+class BookmarkNode;
+} // namespace bookmarks
+
+namespace ios {
+class ChromeBrowserState;
+} // namespace ios
+
+@protocol BookmarkFolderEditorViewControllerDelegate
+// Called when the controller successfully created or edited |folder|.
+- (void)bookmarkFolderEditor:(BookmarkFolderEditorViewController*)folderEditor
+ didFinishEditingFolder:(const bookmarks::BookmarkNode*)folder;
+// Called when the user deletes the edited folder.
+// This is never called if the editor is created with
+// |folderCreatorWithBookmarkModel:parentFolder:|.
+- (void)bookmarkFolderEditorDidDeleteEditedFolder:
+ (BookmarkFolderEditorViewController*)folderEditor;
+// Called when the user cancels the folder creation.
+- (void)bookmarkFolderEditorDidCancel:
+ (BookmarkFolderEditorViewController*)folderEditor;
+@end
+
+// View controller for creating or editing a bookmark folder. Allows editing of
+// the title and selecting the parent folder of the bookmark.
+// This controller monitors the state of the bookmark model, so changes to the
+// bookmark model can affect this controller's state.
+@interface BookmarkFolderEditorViewController : CollectionViewController
+
+@property(nonatomic, assign) id<BookmarkFolderEditorViewControllerDelegate>
+ delegate;
+
+// Designated factory methods.
+
+// Returns a view controller set to create a new folder in |parentFolder|.
+// If |parentFolder| is NULL, a default parent will be set.
+// |bookmarkModel| must not be NULL and must be loaded.
++ (instancetype)
+folderCreatorWithBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
+ parentFolder:(const bookmarks::BookmarkNode*)parentFolder;
+
+// |bookmarkModel| must not be null and must be loaded.
+// |folder| must not be NULL and be editable.
+// |browserState| must not be null.
++ (instancetype)
+folderEditorWithBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
+ folder:(const bookmarks::BookmarkNode*)folder
+ browserState:(ios::ChromeBrowserState*)browserState;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_FOLDER_EDITOR_VIEW_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698