blob: 8be1ac1e55af189916540650911230a95f4bc43c [file] [log] [blame]
// 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 ash.media_app_ui.mojom;
import "third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom";
// Browser interface for chrome://media-app to bootstrap a connection.
interface PageHandlerFactory {
// Create a page handler which exposes interfaces implemented in the browser
// process to the renderer process via |handler|.
CreatePageHandler(pending_receiver<PageHandler> handler);
};
// An interface implemented in the browser process that is exposed to the
// renderer process for chrome://media-app.
interface PageHandler {
// Opens the chrome feedback dialog.
OpenFeedbackDialog() => (string? error_message);
// Toggles "browser" fullscreen mode for the window.
ToggleBrowserFullscreenMode() => ();
// Indicate that a trigger for displaying the PDF HaTS survey has occurred.
MaybeTriggerPdfHats() => ();
// Checks if the file path for the file represented by the provided transfer
// token is in a filesystem that ARC is able to write to. Returns false if
// |token| can't be resolved to a path.
IsFileArcWritable(
pending_remote<blink.mojom.FileSystemAccessTransferToken> token)
=> (bool writable);
// Checks if the file path for the file represented by the provided transfer
// token is writable according to Ash. Returns false if |token| can't be
// resolved to a path.
IsFileBrowserWritable(
pending_remote<blink.mojom.FileSystemAccessTransferToken> token)
=> (bool writable);
// Requests the file represented by the provided transfer token to be launched
// in Photos with the edit intent.
EditInPhotos(
pending_remote<blink.mojom.FileSystemAccessTransferToken> token,
string mime_type) => ();
};