| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ | 5 #ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ |
| 6 #define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ | 6 #define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Methods for sending the different messages back to the |client_|. | 34 // Methods for sending the different messages back to the |client_|. |
| 35 // Generally should be called by image_writer::ImageWriter. | 35 // Generally should be called by image_writer::ImageWriter. |
| 36 virtual void SendProgress(int64_t progress); | 36 virtual void SendProgress(int64_t progress); |
| 37 virtual void SendSucceeded(); | 37 virtual void SendSucceeded(); |
| 38 virtual void SendFailed(const std::string& error); | 38 virtual void SendFailed(const std::string& error); |
| 39 virtual void SendCancelled() {} | 39 virtual void SendCancelled() {} |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 void Cancel(); | 42 void Cancel(); |
| 43 | 43 |
| 44 bool ShouldResetImageWriter(const base::FilePath& image, |
| 45 const base::FilePath& device); |
| 46 |
| 44 extensions::mojom::RemovableStorageWriterClientPtr client_; | 47 extensions::mojom::RemovableStorageWriterClientPtr client_; |
| 45 std::unique_ptr<ImageWriter> image_writer_; | 48 std::unique_ptr<ImageWriter> image_writer_; |
| 46 }; | 49 }; |
| 47 | 50 |
| 48 } // namespace image_writer | 51 } // namespace image_writer |
| 49 | 52 |
| 50 #endif // CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ | 53 #endif // CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ |
| OLD | NEW |