chromium/third_party/blink/public/mojom/reporting/reporting.mojom

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module blink.mojom;

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

interface ReportingServiceProxy {
  // Attempts to queue an Intervention report using the Reporting API.
  //
  // (See //third_party/blink/renderer/core/frame/intervention_report_body.h.)
  QueueInterventionReport(url.mojom.Url url,
                          string id,
                          string message,
                          string? source_file,
                          int32 line_number,
                          int32 column_number);

  // Attempts to queue a Deprecation report using the Reporting API.
  //
  // (See //third_party/blink/renderer/core/frame/deprecation/deprecation_report_body.h.)
  QueueDeprecationReport(url.mojom.Url url,
                         string id,
                         mojo_base.mojom.Time? anticipatedRemoval,
                         string message,
                         string? source_file,
                         int32 line_number,
                         int32 column_number);

  // Attempts to queue a CSP Violation report using the Reporting API.
  //
  // (See //third_party/blink/renderer/core/events/security_policy_violation_event.h.)
  QueueCspViolationReport(url.mojom.Url url,
                          string group,
                          string document_url,
                          string? referrer,
                          string? blocked_url,
                          string effective_directive,
                          string original_policy,
                          string? source_file,
                          string? script_sample,
                          string disposition,
                          uint16 status_code,
                          int32 line_number,
                          int32 column_number);

  // Attempts to queue a Permissions Policy violation report using the Reporting API.
  //
  // (See //third_party/blink/renderer/core/frame/permissions_policy_violation_report_body.h.)
  QueuePermissionsPolicyViolationReport(url.mojom.Url url,
                                    string endpoint,
                                    string policy_id,
                                    string disposition,
                                    string? message,
                                    string? source_file,
                                    int32 line_number,
                                    int32 column_number);
  // Attempts to queue a Document Policy violation report using the Reporting API.
  //
  // (See //third_party/blink/renderer/core/frame/document_policy_violation_report_body.h.)
  QueueDocumentPolicyViolationReport(url.mojom.Url url,
                                     string group,
                                     string policy_id,
                                     string disposition,
                                     string? message,
                                     string? source_file,
                                     int32 line_number,
                                     int32 column_number);
};