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

Side by Side Diff: ios/chrome/browser/ui/activity_services/activity_service_controller.mm

Issue 2710923002: Rename UIActivityFindLoginActionSource to UIActivityURLSource. (Closed)
Patch Set: Created 3 years, 10 months 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
« no previous file with comments | « no previous file | ios/chrome/browser/ui/activity_services/activity_service_controller_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #import "ios/chrome/browser/ui/activity_services/activity_service_controller.h" 5 #import "ios/chrome/browser/ui/activity_services/activity_service_controller.h"
6 6
7 #import <MobileCoreServices/MobileCoreServices.h> 7 #import <MobileCoreServices/MobileCoreServices.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (shouldResetUI) 186 if (shouldResetUI)
187 [self resetUserInterface]; 187 [self resetUserInterface];
188 } 188 }
189 189
190 - (NSArray*)activityItemsForData:(ShareToData*)data { 190 - (NSArray*)activityItemsForData:(ShareToData*)data {
191 NSMutableArray* activityItems = [NSMutableArray array]; 191 NSMutableArray* activityItems = [NSMutableArray array];
192 // ShareToData object guarantees that there is a NSURL. 192 // ShareToData object guarantees that there is a NSURL.
193 DCHECK(data.nsurl); 193 DCHECK(data.nsurl);
194 194
195 // In order to support find-login-action protocol, the provider object 195 // In order to support find-login-action protocol, the provider object
196 // UIActivityFindLoginActionSource supports both Password Management 196 // UIActivityURLSource supports both Password Management App Extensions
197 // App Extensions (e.g. 1Password) and also provide a public.url UTType 197 // (e.g. 1Password) and also provide a public.url UTType for Share Extensions
198 // for Share Extensions (e.g. Facebook, Twitter). 198 // (e.g. Facebook, Twitter).
199 UIActivityFindLoginActionSource* loginActionProvider = 199 UIActivityURLSource* loginActionProvider =
200 [[UIActivityFindLoginActionSource alloc] 200 [[UIActivityURLSource alloc] initWithURL:data.nsurl
201 initWithURL:data.nsurl 201 subject:data.title
202 subject:data.title 202 thumbnailGenerator:data.thumbnailGenerator];
203 thumbnailGenerator:data.thumbnailGenerator];
204 [activityItems addObject:loginActionProvider]; 203 [activityItems addObject:loginActionProvider];
205 204
206 UIActivityTextSource* textProvider = 205 UIActivityTextSource* textProvider =
207 [[UIActivityTextSource alloc] initWithText:data.title]; 206 [[UIActivityTextSource alloc] initWithText:data.title];
208 [activityItems addObject:textProvider]; 207 [activityItems addObject:textProvider];
209 208
210 if (data.image) { 209 if (data.image) {
211 UIActivityImageSource* imageProvider = 210 UIActivityImageSource* imageProvider =
212 [[UIActivityImageSource alloc] initWithImage:data.image]; 211 [[UIActivityImageSource alloc] initWithImage:data.image];
213 [activityItems addObject:imageProvider]; 212 [activityItems addObject:imageProvider];
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return NO; 295 return NO;
297 } 296 }
298 297
299 #pragma mark - For Testing 298 #pragma mark - For Testing
300 299
301 - (void)setShareToDelegateForTesting:(id<ShareToDelegate>)delegate { 300 - (void)setShareToDelegateForTesting:(id<ShareToDelegate>)delegate {
302 shareToDelegate_ = delegate; 301 shareToDelegate_ = delegate;
303 } 302 }
304 303
305 @end 304 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/activity_services/activity_service_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698