OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_SOURCE_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_SOURCE_H_ |
6 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_SOURCE_H_ | 6 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_SOURCE_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #import <UIKit/UIKit.h> | 9 #import <UIKit/UIKit.h> |
10 | 10 |
11 // Provides an URL and a subject to UIActivities. The subject is used by the | 11 #import "ios/chrome/browser/ui/activity_services/chrome_activity_item_thumbnail_ generator.h" |
12 // Mail UIActivities to populate the subject field. | |
13 @interface UIActivityURLSource : NSObject<UIActivityItemSource> | |
14 | |
15 // Default initializer. |subject| and |url| must not be nil. | |
16 - (instancetype)initWithURL:(NSURL*)url subject:(NSString*)subject; | |
17 | |
18 @end | |
19 | 12 |
20 // Returns a text to the UIActivities that can take advantage of it. | 13 // Returns a text to the UIActivities that can take advantage of it. |
21 @interface UIActivityTextSource : NSObject<UIActivityItemSource> | 14 @interface UIActivityTextSource : NSObject<UIActivityItemSource> |
22 | 15 |
23 // Default initializer. |text| must not be nil. | 16 // Default initializer. |text| must not be nil. |
24 - (instancetype)initWithText:(NSString*)text; | 17 - (instancetype)initWithText:(NSString*)text; |
25 | 18 |
26 @end | 19 @end |
27 | 20 |
28 // Returns an image to the UIActivities that can take advantage of it. | 21 // Returns an image to the UIActivities that can take advantage of it. |
29 @interface UIActivityImageSource : NSObject<UIActivityItemSource> | 22 @interface UIActivityImageSource : NSObject<UIActivityItemSource> |
30 | 23 |
31 // Default initializer. |image| must not be nil. | 24 // Default initializer. |image| must not be nil. |
32 - (instancetype)initWithImage:(UIImage*)image; | 25 - (instancetype)initWithImage:(UIImage*)image; |
33 | 26 |
34 @end | 27 @end |
35 | 28 |
36 // This UIActivityItemSource-conforming object communicates with Password | 29 // This UIActivityItemSource-conforming object communicates with Password |
37 // Management App Extensions by returning a NSDictionary with the URL of the | 30 // Management App Extensions by returning a NSDictionary with the URL of the |
38 // current page *and* also conforms to UTType public.url so it can be used | 31 // current page *and* also conforms to UTType public.url so it can be used |
39 // with other Social Sharing Extensions as well. The |subject| is used by | 32 // with other Social Sharing Extensions as well. The |subject| is used by |
40 // Mail applications to pre-fill in the subject line. | 33 // Mail applications to pre-fill in the subject line. The |thumbnailGenerator| |
34 // is used by extensions displaying thumbnails of what is shared, for example | |
Olivier
2017/01/20 10:14:00
It is not really used by extension, right?
It is u
jif
2017/01/24 10:29:50
Done.
| |
35 // the Chrome iOS Share Extension. | |
41 @interface UIActivityFindLoginActionSource : NSObject<UIActivityItemSource> | 36 @interface UIActivityFindLoginActionSource : NSObject<UIActivityItemSource> |
42 | 37 |
43 // Default initializer. |subject| and |url| must not be nil. | 38 // Default initializer. |subject| and |url| must not be nil. |
44 - (instancetype)initWithURL:(NSURL*)url subject:(NSString*)subject; | 39 // |thumbnailGenerator| may be nil. |
40 - (instancetype)initWithURL:(NSURL*)url | |
41 subject:(NSString*)subject | |
42 thumbnailGenerator:(ThumbnailGenerator)thumbnailGenerator; | |
45 | 43 |
46 @end | 44 @end |
47 | 45 |
48 #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_SOURCE_H _ | 46 #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_SOURCE_H _ |
OLD | NEW |