1 // Copyright 2019 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_FILE_MANAGER_FILE_TASKS_OBSERVER_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_TASKS_OBSERVER_H_ 7 8 #include <vector> 9 10 #include "base/files/file_path.h" 11 #include "base/observer_list_types.h" 12 13 namespace file_manager { 14 namespace file_tasks { 15 16 class FileTasksObserver : public base::CheckedObserver { 17 public: 18 enum class OpenType { 19 // Launch from the files app or the Downloads page. 20 kLaunch, 21 22 // Chosen from a file-open dialog. 23 kOpen, 24 25 // Chosen from a file-save-as dialog. 26 kSaveAs, 27 28 // A file was downloaded in Chrome. 29 kDownload, 30 }; 31 32 struct FileOpenEvent { 33 base::FilePath path; 34 OpenType open_type; 35 }; 36 OnFilesOpened(const std::vector<FileOpenEvent> & file_opens)37 virtual void OnFilesOpened(const std::vector<FileOpenEvent>& file_opens) {} 38 }; 39 40 } // namespace file_tasks 41 } // namespace file_manager 42 43 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_TASKS_OBSERVER_H_ 44