Chromium Code Reviews| Index: chrome/browser/media_galleries/fileapi/supported_image_type_validator.h |
| diff --git a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c42545d2627cf5e247a72047163bebfc7deee376 |
| --- /dev/null |
| +++ b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_IMAGE_TYPE_VALIDATOR_H_ |
| +#define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_IMAGE_TYPE_VALIDATOR_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/files/file_path.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "webkit/fileapi/copy_or_move_file_validator.h" |
| + |
| +class ImageDecoder; |
| + |
| +namespace chrome { |
| + |
| +class MediaFileValidatorFactory; |
| + |
| +class SupportedImageTypeValidator : public fileapi::CopyOrMoveFileValidator { |
|
Greg Billock
2013/05/22 16:21:59
Class comment.
vandebo (ex-Chrome)
2013/05/22 18:41:17
Done.
|
| + public: |
| + virtual ~SupportedImageTypeValidator(); |
| + |
| + static bool SupportsFileType(const base::FilePath& path); |
| + |
| + virtual void StartValidation( |
|
Greg Billock
2013/05/22 16:21:59
Even if these are per-file, I'd still expect the A
vandebo (ex-Chrome)
2013/05/22 18:41:17
See previous reply.
|
| + const fileapi::CopyOrMoveFileValidator::ResultCallback& |
| + result_callback) OVERRIDE; |
| + |
| + private: |
| + friend class MediaFileValidatorFactory; |
| + |
| + explicit SupportedImageTypeValidator(const base::FilePath& file); |
| + |
| + void OnValidateData(scoped_ptr<std::string> data); |
| + |
| + base::FilePath path_; |
| + scoped_refptr<ImageDecoder> decoder_; |
| + fileapi::CopyOrMoveFileValidator::ResultCallback callback_; |
| + base::WeakPtrFactory<SupportedImageTypeValidator> weak_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SupportedImageTypeValidator); |
| +}; |
| + |
| +} // namespace chrome |
| + |
| +#endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_IMAGE_TYPE_VALIDATOR_H_ |