drive_integration_service.mojom 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. module crosapi.mojom;
  5. import "mojo/public/mojom/base/file_path.mojom";
  6. // Interface for drive mount point path observers. Implemented by lacros-chrome.
  7. // Used by ash-chrome to send drive availability updates.
  8. [Stable]
  9. interface DriveIntegrationServiceObserver {
  10. // Called when an observed drive availability changes.
  11. [MinVersion=1]
  12. OnMountPointPathChanged@0(mojo_base.mojom.FilePath path);
  13. };
  14. // This interface is used to query the DriveIntegrationService for the local
  15. // Google Drive mount associated with the current Ash profile. As well as allows
  16. // clients to subscribe to drive availability updates.
  17. // Implemented by ash-chrome.
  18. [Stable, Uuid="60fd345d-0f72-4941-a035-910b93c141fa"]
  19. interface DriveIntegrationService {
  20. // Returns the path of the mount point for Google Drive. Returns an empty file
  21. // path if the Google Drive mount is not available.
  22. GetMountPointPath@0() => (mojo_base.mojom.FilePath drive_path);
  23. // Adds an observer for changes in drive availability. The observer is fired
  24. // immediately with the current mount point path value or empty value in case
  25. // drive is disabled in Ash. Multiple observers may be registered.
  26. [MinVersion=1]
  27. AddDriveIntegrationServiceObserver@1(
  28. pending_remote<DriveIntegrationServiceObserver> observer);
  29. };