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

Side by Side Diff: ios/chrome/share_extension/share_extension_view.h

Issue 2586713002: Upstream code and resources for Chrome on iOS extensions. (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 2016 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
5 #ifndef IOS_CHROME_SHARE_EXTENSION_SHARE_EXTENSION_VIEW_H_
6 #define IOS_CHROME_SHARE_EXTENSION_SHARE_EXTENSION_VIEW_H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "ios/chrome/common/app_group/app_group_constants.h"
11
12 @class ShareExtensionView;
13
14 @protocol ShareExtensionViewActionTarget
15
16 // Called when the user presses the cancel button.
17 - (void)shareExtensionViewDidSelectCancel:(id)sender;
18
19 // Called when the user presses the "Add to bookmarks" button.
20 - (void)shareExtensionViewDidSelectAddToBookmarks:(id)sender;
21
22 // Called when the user presses the "Add to Reading List" button.
23 - (void)shareExtensionViewDidSelectAddToReadingList:(id)sender;
24 @end
25
26 // This is the view for the ShareExtensionController. It shows the shared
27 // URL and title and let the user choose between adding a bookmark and
28 // adding item to reading list.
29 @interface ShareExtensionView : UIView
30
31 // Creates a ShareExtensionView with the |delegate|. Designated
32 // initializer.
33 - (instancetype)initWithActionTarget:(id<ShareExtensionViewActionTarget>)target
34 NS_DESIGNATED_INITIALIZER;
35 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
36 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
37
38 // Sets the |URL| displayed in the share view.
39 - (void)setURL:(NSURL*)URL;
40
41 // Sets the |title| displayed in the share view.
42 - (void)setTitle:(NSString*)title;
43
44 // Sets the |screenshot| displayed in the share view.
45 - (void)setScreenshot:(UIImage*)screenshot;
46
47 @end
48
49 #endif // IOS_CHROME_SHARE_EXTENSION_SHARE_EXTENSION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698