blob: c384ff49f7cf4401ad9ba00533567428da2f0ac8 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/frame/dactyloscoper.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
namespace blink {
Dactyloscoper::Dactyloscoper() = default;
void Dactyloscoper::Record(WebFeature feature) {
// TODO(mkwst): This is a stub. We'll pull in more interesting functionality
// here over time.
}
// static
void Dactyloscoper::Record(ExecutionContext* context, WebFeature feature) {
// TODO: Workers.
if (!context)
return;
if (auto* document = DynamicTo<Document>(context)) {
if (DocumentLoader* loader = document->Loader())
loader->GetDactyloscoper().Record(feature);
}
}
} // namespace blink