chromium/chromeos/crosapi/mojom/feedback.mojom

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

module crosapi.mojom;

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

// The feedback sources supported for invoking feedback report from Lacros.
// Note: When you add a new value, please add a test case accordingly in:
// chrome/browser/feedback/show_feedback_page_lacros_browertest.cc.
//
// Next MinVersion: 7
// Next ID: 9
//
[Stable, Extensible]
enum LacrosFeedbackSource {
  kLacrosBrowserCommand = 0,
  kLacrosSettingsAboutPage = 1,
  [Default, MinVersion=1] kUnknown = 2,
  [MinVersion=1] kLacrosAutofillContextMenu = 3,
  [MinVersion=2] kLacrosSadTabPage = 4,
  [MinVersion=2] kLacrosChromeLabs = 5,
  [MinVersion=2] kLacrosQuickAnswers = 6,
  // Deprecated as the window layout menu feedback button has been removed.
  [MinVersion=3] kDeprecatedLacrosWindowLayoutMenu = 7,
  [MinVersion=4] kFeedbackSourceCookieControls = 8,
  [MinVersion=5] kFeedbackSourceSettingsPerformancePage = 9,
  [MinVersion=5] kFeedbackSourceProfileErrorDialog = 10,
  [MinVersion=5] kFeedbackSourceQuickOffice=11,
  [MinVersion=6] kFeedbackSourceAI=12,
  [MinVersion=7] kFeedbackSourceLensOverlay=13,
};

[Stable]
struct FeedbackInfo {
  // Url of the web page of lacros chrome from which the user reports an issue.
  url.mojom.Url page_url@0;

  // Source from which the user reports an issue.
  LacrosFeedbackSource source@1;

  // Template text for feedback description.
  string description_template@2;

  // Placehold text of feedback description.
  string description_placeholder_text@3;

  // Category tag of feedback report.
  string category_tag@4;

  // Extra diagnostics information.
  // For example, "Failed to connect to wifi network.".
  string extra_diagnostics@5;

  // Autofill metadata (e.g. form signatures, last autofill event type, etc).
 [MinVersion=1] mojo_base.mojom.Value? autofill_metadata@6;

 [MinVersion=2] mojo_base.mojom.Value? ai_metadata@7;
};

// This interface is implemented by ash-chrome. It allows lacros-chrome to
// request ash-chrome to display Feedback ui.
[Stable, Uuid="f95688a1-3076-484f-852f-65772f2a2f68"]
interface Feedback {
  // Displays the Feedback ui.
  ShowFeedbackPage@0(FeedbackInfo feedback_info);
};