Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RCTImageLoader] Make C++ requirement opt-in #27730

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Libraries/Image/RCTImageLoaderWithAttributionProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RCT_EXTERN void RCTEnableImageLoadingPerfInstrumentation(BOOL enabled);

@protocol RCTImageLoaderWithAttributionProtocol<RCTImageLoaderProtocol>

#ifdef __cplusplus
/**
* Same as the variant in RCTImageURLLoaderProtocol, but allows passing attribution
* information that each image URL loader can process.
Expand All @@ -30,6 +31,8 @@ RCT_EXTERN void RCTEnableImageLoadingPerfInstrumentation(BOOL enabled);
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
completionBlock:(RCTImageLoaderCompletionBlock)completionBlock;
#endif

/**
* Image instrumentation - notify that the image content (UIImage) has been set on the native view.
*/
Expand Down
4 changes: 4 additions & 0 deletions Libraries/Image/RCTImageURLLoaderWithAttribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#import <React/RCTImageURLLoader.h>

#ifdef __cplusplus
namespace facebook {
namespace react {

Expand All @@ -17,6 +18,7 @@ struct ImageURLLoaderAttribution {

} // namespace react
} // namespace facebook
#endif

@interface RCTImageURLLoaderRequest : NSObject

Expand All @@ -35,6 +37,7 @@ struct ImageURLLoaderAttribution {
*/
@protocol RCTImageURLLoaderWithAttribution <RCTImageURLLoader>

#ifdef __cplusplus
/**
* Same as the RCTImageURLLoader variant above, but allows optional `attribution` information.
* Caller may also specify a preferred requestId for tracking purpose.
Expand All @@ -48,6 +51,7 @@ struct ImageURLLoaderAttribution {
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler;
#endif

/**
* Image instrumentation - notify that the image content (UIImage) has been set on the native view.
Expand Down