blob: 409d018cc9e788deecfaba75f062b6f9213a49df [file] [log] [blame]
// Copyright 2016 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_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_
#define IOS_CHROME_BROWSER_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_
#import <Foundation/Foundation.h>
namespace bookmarks {
class BookmarkModel;
}
class ReadingListModel;
// This class observes the Application group folder
// |app_group::ShareExtensionItemsFolder()| and process the files it contains
// when a new file is created or when application is put in foreground.
@interface ShareExtensionItemReceiver : NSObject
+ (instancetype)sharedInstance;
// Sets the bookmark and reading list models to use. |shutdown| must be called
// before other models are set.
// The receiver will start observe the share extension folder and send items to
// these models.
- (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
readingListModel:(ReadingListModel*)readingListModel;
// Stops observers and pending operations.
- (void)shutdown;
@end
#endif // IOS_CHROME_BROWSER_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_