mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
47 lines
2.1 KiB
Plaintext
47 lines
2.1 KiB
Plaintext
// Copyright 2017 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.
|
|
|
|
module media.mojom;
|
|
|
|
import "media/mojo/interfaces/media_types.mojom";
|
|
import "media/mojo/interfaces/video_decode_stats_recorder.mojom";
|
|
import "media/mojo/interfaces/watch_time_recorder.mojom";
|
|
import "mojo/public/mojom/base/time.mojom";
|
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
|
import "url/mojom/origin.mojom";
|
|
|
|
// Provider interface used to avoid having one time setters on each interface.
|
|
// Each recorder will be stamped with an ID which can be used for linking UKM.
|
|
interface MediaMetricsProvider {
|
|
// Assigns a playback ID and sets up this provider instance with information
|
|
// needed to make UKM reports. No other methods may be called until after
|
|
// Initialize() has been called.
|
|
//
|
|
// TODO(crbug.com/787209): Stop getting origin from the renderer.
|
|
Initialize(bool is_mse, bool is_top_frame,
|
|
url.mojom.Origin untrusted_top_origin);
|
|
|
|
// Called when a playback ends in error. The status is reported to UKM when
|
|
// the provider is destructed.
|
|
OnError(PipelineStatus status);
|
|
|
|
// Setters for various one-time lazily generated metrics or properties.
|
|
SetIsEME();
|
|
SetTimeToMetadata(mojo_base.mojom.TimeDelta elapsed);
|
|
SetTimeToFirstFrame(mojo_base.mojom.TimeDelta elapsed);
|
|
SetTimeToPlayReady(mojo_base.mojom.TimeDelta elapsed);
|
|
|
|
// Creates a WatchTimeRecorder instance using |properties|. If any of those
|
|
// properties changes, a new recorder should be requested.
|
|
AcquireWatchTimeRecorder(PlaybackProperties properties,
|
|
WatchTimeRecorder& recorder);
|
|
|
|
// Creates a VideoDecodeStatsRecorder instance. Provide the origin of the top
|
|
// frame of the page hosting the video. Privacy team requires we use only the
|
|
// top-frame origin. |is_top_frame| signals whether the video is hosted in the
|
|
// top frame vs some inner frame to help interpret the origin.
|
|
// TODO(crbug.com/787209): Stop getting origin from the renderer.
|
|
AcquireVideoDecodeStatsRecorder(VideoDecodeStatsRecorder& recorder);
|
|
};
|