OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this image code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ | |
6 #define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 #include "chrome/utility/utility_message_handler.h" | |
11 #include "ipc/ipc_message.h" | |
12 | |
13 namespace chrome { | |
14 namespace image_writer { | |
15 | |
16 class ImageWriter; | |
17 | |
18 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.
| |
19 public: | |
20 ImageWriterHandler(); | |
21 virtual ~ImageWriterHandler(); | |
22 | |
23 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | |
24 | |
25 virtual void SendProgress(int progress); | |
26 virtual void SendFailed(const std::string& message); | |
27 virtual void SendSucceeded(); | |
28 | |
29 private: | |
30 void Send(IPC::Message* msg); | |
31 void OnWriteStart(const base::FilePath& image, | |
32 const base::FilePath& device); | |
33 void OnVerifyStart(const base::FilePath& image, | |
34 const base::FilePath& device); | |
35 void OnCancel(); | |
36 | |
37 scoped_refptr<ImageWriter> image_writer_; | |
38 base::WeakPtrFactory<ImageWriterHandler> weak_factory_; | |
39 }; | |
40 | |
41 } // namespace image_writer | |
42 } // namespace chrome | |
43 | |
44 #endif // CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_HANDLER_H_ | |
OLD | NEW |