naiveproxy/chrome/browser/ui/webui/interventions_internals/interventions_internals.mojom

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-01-28 19:30:36 +03:00
// 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 mojom;
import "url/mojo/url.mojom";
struct PreviewsStatus {
// The human readable description of the status that will be displayed on
// chrome://interventions-internals.
string description;
bool enabled;
};
struct MessageLog {
// The tye of event message (E.g. "Navigation").
string type;
// The human readable description of the event.
string description;
// The url that associated with the event.
url.mojom.Url url;
// The time when the event happened in millisecond since Unix epoch.
int64 time;
};
interface InterventionsInternalsPageHandler {
// Returns a map of previews modes statuses.
GetPreviewsEnabled() => (map<string, PreviewsStatus> statuses);
// Inject the client side page object.
SetClientPage(InterventionsInternalsPage page);
};
interface InterventionsInternalsPage {
// Pushes a new log message to the page. This is called by
// InterventionsInternalsPageHandler when it receives a new MessageLog, and
// publishes it on the javscript side.
LogNewMessage(MessageLog log);
};