#include "content/shell/common/main_frame_counter_test_impl.h"
#include "base/no_destructor.h"
#include "content/common/main_frame_counter.h"
#include "mojo/public/cpp/bindings/receiver.h"
namespace content {
MainFrameCounterTestImpl* GetMainFrameCounterTestImpl() {
static base::NoDestructor<MainFrameCounterTestImpl> instance;
return instance.get();
}
MainFrameCounterTestImpl::MainFrameCounterTestImpl() = default;
MainFrameCounterTestImpl::~MainFrameCounterTestImpl() = default;
void MainFrameCounterTestImpl::Bind(
mojo::PendingReceiver<mojom::MainFrameCounterTest> receiver) {
GetMainFrameCounterTestImpl()->receiver_.Bind(std::move(receiver));
}
void MainFrameCounterTestImpl::HasMainFrame(HasMainFrameCallback callback) {
std::move(callback).Run(MainFrameCounter::has_main_frame());
}
}