Files
react-native/ReactCommon/fabric/imagemanager/ImageManager.h
T
Kevin Gozali 13a9a03203 Fabric iOS: pass in surfaceId when requesting to download image
Summary:
Changelog: [Internal]

For attribution purpose, pass in the surfaceId and let the app-specific image loader handle it.

Reviewed By: shergin

Differential Revision: D18494106

fbshipit-source-id: e22ca339a2dd12c5bd619b596c7db9c49dc111d0
2019-11-16 00:13:48 -08:00

41 lines
864 B
C++

/*
* 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.
*/
#pragma once
#include <memory>
#include <react/core/ReactPrimitives.h>
#include <react/imagemanager/ImageRequest.h>
#include <react/imagemanager/primitives.h>
#include <react/utils/ContextContainer.h>
namespace facebook {
namespace react {
class ImageManager;
using SharedImageManager = std::shared_ptr<ImageManager>;
/*
* Cross platform facade for iOS-specific RCTImageManager.
*/
class ImageManager {
public:
ImageManager(ContextContainer::Shared const &contextContainer);
~ImageManager();
ImageRequest requestImage(const ImageSource &imageSource, SurfaceId surfaceId)
const;
private:
void *self_;
};
} // namespace react
} // namespace facebook