blob: b094fb67a11d09f2413834324ab8546f2b76c8e2 [file] [log] [blame]
// Copyright 2017 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.
#import <UIKit/UIKit.h>
class ChromeBrowserState;
namespace bookmarks {
class BookmarkNode;
} // namespace bookmarks
namespace user_prefs {
class PrefRegistrySyncable;
} // namespace user_prefs
class GURL;
@class MDCSnackbarMessage;
// Mediator for the bookmarks.
@interface BookmarkMediator : NSObject
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithBrowserState:(ChromeBrowserState*)browserState
// Registers the feature preferences.
+ (void)registerBrowserStatePrefs:(user_prefs::PrefRegistrySyncable*)registry;
// Accesses the default folder for bookmarks. The default folder is Mobile
// Bookmarks.
+ (const bookmarks::BookmarkNode*)folderForNewBookmarksInBrowserState:
+ (void)setFolderForNewBookmarks:(const bookmarks::BookmarkNode*)folder
// Adds a bookmark with a |title| and a |URL| and display a snackbar with an
// |editAction|. Returns a message to be displayed after the Bookmark has been
// added.
- (MDCSnackbarMessage*)addBookmarkWithTitle:(NSString*)title
URL:(const GURL&)URL
editAction:(void (^)())editAction;