#ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_
#define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_
#include "chrome/utility/image_writer/image_writer.h"
#include "chrome/utility/utility_message_handler.h"
#include "ipc/ipc_message.h"
namespace base {
class FilePath;
}
namespace image_writer {
class ImageWriterHandler : public chrome::UtilityMessageHandler {
public:
ImageWriterHandler();
virtual ~ImageWriterHandler();
virtual void SendSucceeded();
virtual void SendCancelled();
virtual void SendFailed(const std::string& message);
virtual void SendProgress(int64 progress);
private:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
void Send(IPC::Message* msg);
void OnWriteStart(const base::FilePath& image, const base::FilePath& device);
void OnVerifyStart(const base::FilePath& image, const base::FilePath& device);
void OnCancel();
bool IsValidDevice(const base::FilePath& device);
ImageWriter image_writer_;
};
}
#endif