mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
eb95b2f855
Summary: Passing thru image instrumentation activities to the image loader class, which now supports Fabric instrumentation. Changelog: [Internal] Reviewed By: mdvacca, voznesenskym Differential Revision: D19047898 fbshipit-source-id: d12cb5a06a83e85347629a25e593d30cb9020fe6
31 lines
664 B
Plaintext
31 lines
664 B
Plaintext
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import "RCTImageURLLoaderWithAttribution.h"
|
|
|
|
@implementation RCTImageURLLoaderRequest
|
|
|
|
- (instancetype)initWithRequestId:(NSString *)requestId imageURL:(NSURL *)imageURL cancellationBlock:(RCTImageLoaderCancellationBlock)cancellationBlock
|
|
{
|
|
if (self = [super init]) {
|
|
_requestId = requestId;
|
|
_imageURL = imageURL;
|
|
_cancellationBlock = cancellationBlock;
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)cancel
|
|
{
|
|
if (_cancellationBlock) {
|
|
_cancellationBlock();
|
|
}
|
|
}
|
|
|
|
@end
|