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

Side by Side Diff: ios/chrome/browser/ui/bookmarks/bookmark_interaction_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_INTERACTION_CONTROLLER_H_
5 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_INTERACTION_CONTROLLER_H_
6
7 #import <UIKit/UIKit.h>
8
9 @class Tab;
10 @protocol UrlLoader;
11
12 namespace bookmarks {
13 class BookmarkNode;
14 } // namespace bookmarks
15
16 namespace ios {
17 class ChromeBrowserState;
18 } // namespace ios
19
20 namespace user_prefs {
21 class PrefRegistrySyncable;
22 } // namespace user_prefs
23
24 // The BookmarkInteractionController abstracts the management of the various
25 // UIViewControllers used to create, remove and edit a bookmark. Its main entry
26 // point is called when the user taps on the star icon.
27 @interface BookmarkInteractionController : NSObject
28
29 // Registers the feature preferences.
30 + (void)registerBrowserStatePrefs:(user_prefs::PrefRegistrySyncable*)registry;
31
32 // Accesses the default folder for new bookmarks. The default folder is Mobile
33 // Bookmarks.
34 + (const bookmarks::BookmarkNode*)folderForNewBookmarksInBrowserState:
35 (ios::ChromeBrowserState*)browserState;
36 + (void)setFolderForNewBookmarks:(const bookmarks::BookmarkNode*)folder
37 inBrowserState:(ios::ChromeBrowserState*)browserState;
38
39 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState
40 loader:(id<UrlLoader>)loader
41 parentController:(UIViewController*)parentController
42 NS_DESIGNATED_INITIALIZER;
43 - (instancetype)init NS_UNAVAILABLE;
44
45 // Presents the bookmark UI for a single bookmark. The |parentView| and |origin|
46 // are hints that may or may not be used in how the UI for a single bookmark
47 // will appear.
48 // Subclasses must override this method.
49 - (void)presentBookmarkForTab:(Tab*)tab
50 currentlyBookmarked:(BOOL)bookmarked
51 inView:(UIView*)parentView
52 originRect:(CGRect)origin;
53
54 // Presents the bookmarks browser modally. Subclasses must override this method.
55 - (void)presentBookmarks;
56
57 // Removes any bookmark modal controller from view if visible. Subclasses must
58 // override this method.
59 - (void)dismissBookmarkModalControllerAnimated:(BOOL)animated;
60
61 // Removes any snackbar related to bookmarks that could have been presented. The
62 // default implementation is a no-op.
63 - (void)dismissSnackbar;
64
65 @end
66
67 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_INTERACTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698