blob: aa4c07060a581a92813fc98756ace5f7bae20eaf [file] [log] [blame]
// Copyright 2020 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 content.mojom;
import "mojo/public/mojom/base/file_path.mojom";
import "mojo/public/mojom/base/values.mojom";
import "mojo/public/mojom/base/string16.mojom";
import "third_party/blink/public/mojom/permissions/permission_status.mojom";
import "url/mojom/url.mojom";
import "url/mojom/origin.mojom";
// Web test messages sent from the browser process to the renderer.
interface WebTestControl {
// Used send flag changes to renderers - either when
// 1) broadcasting change happening in one renderer to all other renderers, or
// 2) sending accumulated changes to a single new renderer.
ReplicateWebTestRuntimeFlagsChanges(
mojo_base.mojom.DictionaryValue changed_layout_test_runtime_flags);
};
// Web test messages sent from the renderer process to the browser.
interface WebTestClient {
// Simulates a click on the notification.
// - |title|: the title of the notification.
// - |action_index|: indicates which action was clicked.
// - |reply|: indicates the user reply.
SimulateWebNotificationClick(
string title, int32 action_index, mojo_base.mojom.String16? reply);
// Simulates closing a titled web notification depending on the user
// click.
// - |title|: the title of the notification.
// - |by_user|: whether the user clicks the notification.
SimulateWebNotificationClose(string title, bool by_user);
// Simulates a user deleting a content index entry.
SimulateWebContentIndexDelete(string id);
// Reset all permissions of WebTestPermissionManager.
ResetPermissions();
// Sets the permission for |name| to |status| when queried or requested in
// |origin| from |embedding_origin|.
SetPermission(string name,
blink.mojom.PermissionStatus status,
url.mojom.Url origin,
url.mojom.Url embedding_origin);
// Notifies the browser that one of renderers has changed web test runtime
// flags (i.e. has set dump_as_text).
WebTestRuntimeFlagsChanged(
mojo_base.mojom.DictionaryValue changed_web_test_runtime_flags);
// Delete all cookies created in this associated storage context.
DeleteAllCookies();
// Clears all WebSQL databases.
ClearAllDatabases();
// Sets WebSQL quota size. If |quota| is the same to kDefaultDatabaseQuota,
// this resets quota to settings with a zero refresh interval to force
// QuotaManager to refresh settings immediately.
SetDatabaseQuota(int32 quota);
// Registers a new isolated filesystem with the given files, and returns the
// new filesystem id.
[Sync]
RegisterIsolatedFileSystem(
array<mojo_base.mojom.FilePath> absolute_filenames)
=> (string filesystem_id);
// Sets the network service-global Trust Tokens key commitments.
// |raw_commitments| should be JSON-encoded according to the format expected
// by NetworkService::SetTrustTokenKeyCommitments.
SetTrustTokenKeyCommitments(string raw_commitments) => ();
// Clears all persistent Trust Tokens state.
ClearTrustTokenState() => ();
};