Files
react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h
T
Valentin Shergin 0b96ada9ac Fabric: Adding #pragma once to ImageTelemetry.h
Summary:
Without this thing some stuff does not compile.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: fkgozali

Differential Revision: D23948622

fbshipit-source-id: f066ada183c0fd6a7b5eec542395d44bbbfe80a3
2020-09-26 22:02:36 -07:00

46 lines
977 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 <react/renderer/core/ReactPrimitives.h>
#include <react/utils/Telemetry.h>
namespace facebook {
namespace react {
/*
* Represents telemetry data associated with a image request
*/
class ImageTelemetry final {
public:
ImageTelemetry(SurfaceId const surfaceId) : surfaceId_(surfaceId) {}
/*
* Signaling
*/
void willRequestUrl();
/*
* Reading
*/
TelemetryTimePoint getWillRequestUrlTime() const;
SurfaceId getSurfaceId() const;
std::string getLoaderModuleName() const;
void setLoaderModuleName(std::string const &loaderModuleName);
private:
TelemetryTimePoint willRequestUrlTime_{kTelemetryUndefinedTimePoint};
const SurfaceId surfaceId_;
std::string loaderModuleName_{""};
};
} // namespace react
} // namespace facebook