#ifndef CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
#define CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
#include "gin/wrappable.h"
namespace blink {
class WebLocalFrame;
}
namespace content {
class StatsCollectionController
: public gin::Wrappable<StatsCollectionController> {
public:
static constexpr gin::WrapperInfo kWrapperInfo = {
{gin::kEmbedderNativeGin},
gin::kStatsCollectionController};
StatsCollectionController(const StatsCollectionController&) = delete;
StatsCollectionController& operator=(const StatsCollectionController&) =
delete;
static void Install(blink::WebLocalFrame* frame);
StatsCollectionController() = default;
~StatsCollectionController() override = default;
private:
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) override;
const gin::WrapperInfo* wrapper_info() const override;
std::string GetHistogram(const std::string& histogram_name);
std::string GetBrowserHistogram(const std::string& histogram_name);
std::string GetTabLoadTiming();
};
}
#endif