| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_ | 5 #ifndef IOS_CHROME_BROWSER_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_ | 6 #define IOS_CHROME_BROWSER_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 namespace bookmarks { | 10 namespace bookmarks { |
| 11 class BookmarkModel; | 11 class BookmarkModel; |
| 12 } | 12 } |
| 13 | 13 |
| 14 class ReadingListModel; | 14 class ReadingListModel; |
| 15 | 15 |
| 16 // This class observes the Application group folder | 16 // This class observes the Application group folder |
| 17 // |app_group::ShareExtensionItemsFolder()| and process the files it contains | 17 // |app_group::ShareExtensionItemsFolder()| and process the files it contains |
| 18 // when a new file is created or when application is put in foreground. | 18 // when a new file is created or when application is put in foreground. |
| 19 @interface ShareExtensionItemReceiver : NSObject | 19 @interface ShareExtensionItemReceiver : NSObject |
| 20 | 20 |
| 21 + (instancetype)sharedInstance; | 21 + (instancetype)sharedInstance; |
| 22 | 22 |
| 23 // Sets the bookmark and reading list models to use. |shutdown| must be called | 23 // Sets the bookmark and reading list models to use. |shutdown| must be called |
| 24 // before other models are set. | 24 // before other models are set. |
| 25 // The receiver will start observe the share extension folder and send items to | 25 // The receiver will start observe the share extension folder and send items to |
| 26 // these models. | 26 // these models. |
| 27 - (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel | 27 - (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel |
| 28 readingListModel:(ReadingListModel*)readingListModel; | 28 readingListModel:(ReadingListModel*)readingListModel; |
| 29 | 29 |
| 30 // Stops observers and pending operations. | 30 // Stops observers and pending operations. |
| 31 - (void)shutdown; | 31 - (void)shutdown; |
| 32 | 32 |
| 33 @end | 33 @end |
| 34 | 34 |
| 35 #endif // IOS_CHROME_BROWSER_UI_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H
_ | 35 #endif // IOS_CHROME_BROWSER_SHARE_EXTENSION_SHARE_EXTENSION_ITEM_RECEIVER_H_ |
| OLD | NEW |