Commit 87eea472 authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

Revert "[iOS] ActivityService cleanup"

This reverts commit 76c127f6.

Reason for revert: This needs to be reverted first to revert crrev.com/c/1172287.

Original change's description:
> [iOS] ActivityService cleanup
>
> Cleanup for the ActivityService.
>
> Bug: none
> Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
> Change-Id: I7feb4acc2711172dfb9829c2b223e6f2c724fa33
> Reviewed-on: https://chromium-review.googlesource.com/1172289
> Commit-Queue: Gauthier Ambard <gambard@chromium.org>
> Reviewed-by: Peter Lee <pkl@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#582599}

TBR=pkl@chromium.org,gambard@chromium.org

Change-Id: I1a2b122518b7b845274a4d27bc897eb9d195a2dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 873718
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Reviewed-on: https://chromium-review.googlesource.com/1173891Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582825}
parent 66e71fc1
...@@ -34,12 +34,8 @@ ...@@ -34,12 +34,8 @@
@property(nonatomic, readonly) NSURL* shareNSURL; @property(nonatomic, readonly) NSURL* shareNSURL;
@property(nonatomic, readonly) NSURL* passwordManagerNSURL; @property(nonatomic, readonly) NSURL* passwordManagerNSURL;
// Title to be shared (not nil).
@property(nonatomic, readonly, copy) NSString* title; @property(nonatomic, readonly, copy) NSString* title;
// Whether the title was provided by the page (i.e., was not generated from
// the url).
@property(nonatomic, readonly, assign) BOOL isOriginalTitle; @property(nonatomic, readonly, assign) BOOL isOriginalTitle;
// Whether the page is printable or not.
@property(nonatomic, readonly, assign) BOOL isPagePrintable; @property(nonatomic, readonly, assign) BOOL isPagePrintable;
// Whether FindInPage can be enabled for this page. // Whether FindInPage can be enabled for this page.
@property(nonatomic, readonly, assign) BOOL isPageSearchable; @property(nonatomic, readonly, assign) BOOL isPageSearchable;
......
...@@ -14,23 +14,38 @@ ...@@ -14,23 +14,38 @@
#endif #endif
@interface ShareToData () { @interface ShareToData () {
@private
// URL to be shared with share extensions. // URL to be shared with share extensions.
GURL _shareURL; GURL shareURL_;
// Visible URL of the page. // Visible URL of the page.
GURL _visibleURL; GURL visibleURL_;
// Title to be shared (not nil).
NSString* title_;
// Whether the title was provided by the page (i.e., was not generated from
// the url).
BOOL isOriginalTitle_;
// Whether the page is printable or not.
BOOL isPagePrintable_;
} }
@property(nonatomic, readwrite, copy) NSString* title;
@property(nonatomic, readwrite, assign) BOOL isOriginalTitle;
@property(nonatomic, readwrite, assign) BOOL isPagePrintable;
@end @end
@implementation ShareToData @implementation ShareToData
@synthesize title = _title; @synthesize title = title_;
@synthesize image = image_; @synthesize image = image_;
@synthesize thumbnailGenerator = _thumbnailGenerator; @synthesize thumbnailGenerator = thumbnailGenerator_;
@synthesize isOriginalTitle = _isOriginalTitle; @synthesize isOriginalTitle = isOriginalTitle_;
@synthesize isPagePrintable = _isPagePrintable; @synthesize isPagePrintable = isPagePrintable_;
@synthesize isPageSearchable = _isPageSearchable; @synthesize isPageSearchable = isPageSearchable_;
@synthesize userAgent = _userAgent; @synthesize userAgent = userAgent_;
- (id)initWithShareURL:(const GURL&)shareURL - (id)initWithShareURL:(const GURL&)shareURL
visibleURL:(const GURL&)visibleURL visibleURL:(const GURL&)visibleURL
...@@ -45,32 +60,32 @@ ...@@ -45,32 +60,32 @@
DCHECK(title); DCHECK(title);
self = [super init]; self = [super init];
if (self) { if (self) {
_shareURL = shareURL; shareURL_ = shareURL;
_visibleURL = visibleURL; visibleURL_ = visibleURL;
_title = [title copy]; title_ = [title copy];
_isOriginalTitle = isOriginalTitle; isOriginalTitle_ = isOriginalTitle;
_isPagePrintable = isPagePrintable; isPagePrintable_ = isPagePrintable;
_isPageSearchable = isPageSearchable; isPageSearchable_ = isPageSearchable;
_userAgent = userAgent; userAgent_ = userAgent;
_thumbnailGenerator = thumbnailGenerator; thumbnailGenerator_ = thumbnailGenerator;
} }
return self; return self;
} }
- (const GURL&)shareURL { - (const GURL&)shareURL {
return _shareURL; return shareURL_;
} }
- (const GURL&)visibleURL { - (const GURL&)visibleURL {
return _visibleURL; return visibleURL_;
} }
- (NSURL*)shareNSURL { - (NSURL*)shareNSURL {
return net::NSURLWithGURL(_shareURL); return net::NSURLWithGURL(shareURL_);
} }
- (NSURL*)passwordManagerNSURL { - (NSURL*)passwordManagerNSURL {
return net::NSURLWithGURL(_visibleURL); return net::NSURLWithGURL(visibleURL_);
} }
@end @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment