Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: chrome/utility/image_writer/image_writer_handler.h

Issue 61643015: Adds imageWriterPrivate support for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorganization and test updates. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/utility/image_writer/image_writer_handler.h
diff --git a/chrome/utility/image_writer/image_writer_handler.h b/chrome/utility/image_writer/image_writer_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..caab7c47712d0b02c37a6a192ea6360ca18624e0
--- /dev/null
+++ b/chrome/utility/image_writer/image_writer_handler.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this image code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_
+#define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_
+
+#include "base/files/file_path.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/utility/utility_message_handler.h"
+#include "ipc/ipc_message.h"
+
+namespace chrome {
+namespace image_writer {
+
+class ImageWriter;
+
+class ImageWriterHandler : public UtilityMessageHandler {
jam 2013/11/21 19:36:41 nit: please comment this class and also the method
Drew Haven 2013/11/26 02:10:43 Went through and documented all the .h files.
+ public:
+ ImageWriterHandler();
+ virtual ~ImageWriterHandler();
+
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ virtual void SendProgress(int progress);
+ virtual void SendFailed(const std::string& message);
+ virtual void SendSucceeded();
+
+ private:
+ 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();
+
+ scoped_refptr<ImageWriter> image_writer_;
+ base::WeakPtrFactory<ImageWriterHandler> weak_factory_;
+};
+
+} // namespace image_writer
+} // namespace chrome
+
+#endif // CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698