summaryrefslogtreecommitdiff
path: root/chromium/qtwebengine/common/media/webrtc_logging.mojom
blob: 782673d5583d1255e0a8dad369e7b9e7ecb114c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2019 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 chrome.mojom;

import "mojo/public/mojom/base/time.mojom";

// Represents a log message sent from the agent.
struct WebRtcLoggingMessage {
  mojo_base.mojom.Time timestamp;
  string data;
};

// Used to listen for new log messages and events from the agent.
interface WebRtcLoggingClient {
  // New log messages are sent in batches to limit the frequency of calls.
  OnAddMessages(array<WebRtcLoggingMessage> messages);

  // Called in response to |Stop| being called on the agent. Any pending
  // log messages will be sent via |OnAddMessages| first.
  OnStopped();
};

// Used to control the renderer-side agent to start / stop logging.
interface WebRtcLoggingAgent {
  // Enables logging to the given |client|.
  Start(pending_remote<WebRtcLoggingClient> client);

  // Stops logging, resulting in any pending messages being sent via
  // |OnAddMessages| and then |OnStopped| being called on the client.
  Stop();
};