1 // Copyright 2020 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 5 #ifndef CHROME_BROWSER_CHROMEOS_CROSAPI_FILE_MANAGER_ASH_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROSAPI_FILE_MANAGER_ASH_H_ 7 8 #include "chromeos/crosapi/mojom/file_manager.mojom.h" 9 #include "mojo/public/cpp/bindings/pending_receiver.h" 10 #include "mojo/public/cpp/bindings/receiver.h" 11 12 namespace crosapi { 13 14 // Implements the crosapi file manager interface. Lives in ash-chrome on the UI 15 // thread. Allows lacros-chrome to make UI requests to the Chrome OS file 16 // manager, for example to open a folder or highlight a file. 17 class FileManagerAsh : public mojom::FileManager { 18 public: 19 explicit FileManagerAsh(mojo::PendingReceiver<mojom::FileManager> receiver); 20 FileManagerAsh(const FileManagerAsh&) = delete; 21 FileManagerAsh& operator=(const FileManagerAsh&) = delete; 22 ~FileManagerAsh() override; 23 24 // crosapi::mojom::FileManager: 25 void DeprecatedShowItemInFolder(const base::FilePath& path) override; 26 void ShowItemInFolder(const base::FilePath& path, 27 ShowItemInFolderCallback callback) override; 28 void OpenFolder(const base::FilePath& path, 29 OpenFolderCallback callback) override; 30 void OpenFile(const base::FilePath& path, OpenFileCallback callback) override; 31 32 private: 33 mojo::Receiver<mojom::FileManager> receiver_; 34 }; 35 36 } // namespace crosapi 37 38 #endif // CHROME_BROWSER_CHROMEOS_CROSAPI_FILE_MANAGER_ASH_H_ 39