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 | |
69 // Callback for progress events. | 64 // Callback for progress events. |
70 virtual void OnProgress(const ExtensionId& extension_id, | 65 virtual void OnProgress(const ExtensionId& extension_id, |
71 image_writer_api::Stage stage, | 66 image_writer_api::Stage stage, |
72 int progress); | 67 int progress); |
73 // Callback for completion events. | 68 // Callback for completion events. |
74 virtual void OnComplete(const ExtensionId& extension_id); | 69 virtual void OnComplete(const ExtensionId& extension_id); |
75 | 70 |
76 // Callback for error events. | 71 // Callback for error events. |
77 virtual void OnError(const ExtensionId& extension_id, | 72 virtual void OnError(const ExtensionId& extension_id, |
78 image_writer_api::Stage stage, | 73 image_writer_api::Stage stage, |
(...skipping 30 matching lines...) Expand all Loading... |
109 | 104 |
110 base::WeakPtrFactory<OperationManager> weak_factory_; | 105 base::WeakPtrFactory<OperationManager> weak_factory_; |
111 | 106 |
112 DISALLOW_COPY_AND_ASSIGN(OperationManager); | 107 DISALLOW_COPY_AND_ASSIGN(OperationManager); |
113 }; | 108 }; |
114 | 109 |
115 } // namespace image_writer | 110 } // namespace image_writer |
116 } // namespace extensions | 111 } // namespace extensions |
117 | 112 |
118 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_
H_ | 113 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_MANAGER_
H_ |
OLD | NEW |