| // 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 |