OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Starts a WriteFromFile operation. | 54 // Starts a WriteFromFile operation. |
55 void StartWriteFromFile(const ExtensionId& extension_id, | 55 void StartWriteFromFile(const ExtensionId& extension_id, |
56 const base::FilePath& path, | 56 const base::FilePath& path, |
57 const std::string& storage_unit_id, | 57 const std::string& storage_unit_id, |
58 const Operation::StartWriteCallback& callback); | 58 const Operation::StartWriteCallback& callback); |
59 | 59 |
60 // Cancels the extensions current operation if any. | 60 // Cancels the extensions current operation if any. |
61 void CancelWrite(const ExtensionId& extension_id, | 61 void CancelWrite(const ExtensionId& extension_id, |
62 const Operation::CancelWriteCallback& callback); | 62 const Operation::CancelWriteCallback& callback); |
63 | 63 |
| 64 // Starts a write that removes the partition table. |
| 65 void DestroyPartitions(const ExtensionId& extension_id, |
| 66 const std::string& storage_unit_id, |
| 67 const Operation::StartWriteCallback& callback); |
| 68 |
64 // Callback for progress events. | 69 // Callback for progress events. |
65 virtual void OnProgress(const ExtensionId& extension_id, | 70 virtual void OnProgress(const ExtensionId& extension_id, |
66 image_writer_api::Stage stage, | 71 image_writer_api::Stage stage, |
67 int progress); | 72 int progress); |
68 // Callback for completion events. | 73 // Callback for completion events. |
69 virtual void OnComplete(const ExtensionId& extension_id); | 74 virtual void OnComplete(const ExtensionId& extension_id); |
70 | 75 |
71 // Callback for error events. | 76 // Callback for error events. |
72 virtual void OnError(const ExtensionId& extension_id, | 77 virtual void OnError(const ExtensionId& extension_id, |
73 image_writer_api::Stage stage, | 78 image_writer_api::Stage stage, |
(...skipping 30 matching lines...) Expand all Loading... |
104 | 109 |
105 base::WeakPtrFactory<OperationManager> weak_factory_; | 110 base::WeakPtrFactory<OperationManager> weak_factory_; |
106 | 111 |
107 DISALLOW_COPY_AND_ASSIGN(OperationManager); | 112 DISALLOW_COPY_AND_ASSIGN(OperationManager); |
108 }; | 113 }; |
109 | 114 |
110 } // namespace image_writer | 115 } // namespace image_writer |
111 } // namespace extensions | 116 } // namespace extensions |
112 | 117 |
113 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_
H_ | 118 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_
H_ |
OLD | NEW |