Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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_MEDIA_GALLERIES_FILEAPI_SUPPORTED_AUDIO_VIDEO_CHECKER_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_AUDIO_VIDEO_CHECKER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/files/file_path.h" | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "base/platform_file.h" | |
| 13 #include "webkit/browser/fileapi/copy_or_move_file_validator.h" | |
| 14 | |
| 15 class SafeAudioVideoChecker; | |
| 16 | |
| 17 namespace chrome { | |
| 18 class MediaFileValidatorFactory; | |
| 19 } | |
| 20 | |
| 21 class SupportedAudioVideoChecker : public fileapi::CopyOrMoveFileValidator { | |
|
Lei Zhang
2013/08/08 00:08:02
Can you add a class description?
vandebo (ex-Chrome)
2013/08/08 17:34:01
Done.
| |
| 22 public: | |
| 23 virtual ~SupportedAudioVideoChecker(); | |
| 24 | |
| 25 static bool SupportsFileType(const base::FilePath& path); | |
| 26 | |
| 27 virtual void StartPreWriteValidation( | |
| 28 const ResultCallback& result_callback) OVERRIDE; | |
| 29 | |
| 30 virtual void StartPostWriteValidation( | |
| 31 const base::FilePath& dest_platform_path, | |
| 32 const ResultCallback& result_callback) OVERRIDE; | |
| 33 | |
| 34 private: | |
| 35 friend class chrome::MediaFileValidatorFactory; | |
| 36 | |
| 37 explicit SupportedAudioVideoChecker(const base::FilePath& file); | |
| 38 | |
| 39 void OnFileOpen(const base::PlatformFile& file); | |
| 40 | |
| 41 base::FilePath path_; | |
| 42 fileapi::CopyOrMoveFileValidator::ResultCallback callback_; | |
| 43 scoped_refptr<SafeAudioVideoChecker> safe_checker_; | |
| 44 base::WeakPtrFactory<SupportedAudioVideoChecker> weak_factory_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(SupportedAudioVideoChecker); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_AUDIO_VIDEO_CHECKER_ H_ | |
| OLD | NEW |