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 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_PRIVATE_
API_H_ | 4 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_PRIVATE_
API_H_ |
5 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_PRIVATE_
API_H_ | 5 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_PRIVATE_
API_H_ |
6 | 6 |
7 #include "chrome/browser/extensions/api/image_writer_private/removable_storage_p
rovider.h" | 7 #include "chrome/browser/extensions/api/image_writer_private/removable_storage_p
rovider.h" |
8 #include "chrome/browser/extensions/chrome_extension_function.h" | 8 #include "chrome/browser/extensions/chrome_extension_function.h" |
9 #include "chrome/common/extensions/api/image_writer_private.h" | 9 #include "chrome/common/extensions/api/image_writer_private.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 | 12 |
13 class ImageWriterPrivateWriteFromUrlFunction | 13 class ImageWriterPrivateWriteFromUrlFunction |
14 : public ChromeAsyncExtensionFunction { | 14 : public ChromeAsyncExtensionFunction { |
15 public: | 15 public: |
16 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.writeFromUrl", | 16 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.writeFromUrl", |
17 IMAGEWRITER_WRITEFROMURL) | 17 IMAGEWRITER_WRITEFROMURL) |
18 ImageWriterPrivateWriteFromUrlFunction(); | 18 ImageWriterPrivateWriteFromUrlFunction(); |
19 | 19 |
20 private: | 20 private: |
21 virtual ~ImageWriterPrivateWriteFromUrlFunction(); | 21 virtual ~ImageWriterPrivateWriteFromUrlFunction(); |
22 virtual bool RunAsync() OVERRIDE; | 22 virtual bool RunAsync() override; |
23 void OnWriteStarted(bool success, const std::string& error); | 23 void OnWriteStarted(bool success, const std::string& error); |
24 }; | 24 }; |
25 | 25 |
26 class ImageWriterPrivateWriteFromFileFunction | 26 class ImageWriterPrivateWriteFromFileFunction |
27 : public ChromeAsyncExtensionFunction { | 27 : public ChromeAsyncExtensionFunction { |
28 public: | 28 public: |
29 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.writeFromFile", | 29 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.writeFromFile", |
30 IMAGEWRITER_WRITEFROMFILE) | 30 IMAGEWRITER_WRITEFROMFILE) |
31 ImageWriterPrivateWriteFromFileFunction(); | 31 ImageWriterPrivateWriteFromFileFunction(); |
32 | 32 |
33 private: | 33 private: |
34 virtual ~ImageWriterPrivateWriteFromFileFunction(); | 34 virtual ~ImageWriterPrivateWriteFromFileFunction(); |
35 virtual bool RunAsync() OVERRIDE; | 35 virtual bool RunAsync() override; |
36 void OnWriteStarted(bool success, const std::string& error); | 36 void OnWriteStarted(bool success, const std::string& error); |
37 }; | 37 }; |
38 | 38 |
39 class ImageWriterPrivateCancelWriteFunction | 39 class ImageWriterPrivateCancelWriteFunction |
40 : public ChromeAsyncExtensionFunction { | 40 : public ChromeAsyncExtensionFunction { |
41 public: | 41 public: |
42 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.cancelWrite", | 42 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.cancelWrite", |
43 IMAGEWRITER_CANCELWRITE) | 43 IMAGEWRITER_CANCELWRITE) |
44 ImageWriterPrivateCancelWriteFunction(); | 44 ImageWriterPrivateCancelWriteFunction(); |
45 | 45 |
46 private: | 46 private: |
47 virtual ~ImageWriterPrivateCancelWriteFunction(); | 47 virtual ~ImageWriterPrivateCancelWriteFunction(); |
48 virtual bool RunAsync() OVERRIDE; | 48 virtual bool RunAsync() override; |
49 void OnWriteCancelled(bool success, const std::string& error); | 49 void OnWriteCancelled(bool success, const std::string& error); |
50 }; | 50 }; |
51 | 51 |
52 class ImageWriterPrivateDestroyPartitionsFunction | 52 class ImageWriterPrivateDestroyPartitionsFunction |
53 : public ChromeAsyncExtensionFunction { | 53 : public ChromeAsyncExtensionFunction { |
54 public: | 54 public: |
55 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.destroyPartitions", | 55 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.destroyPartitions", |
56 IMAGEWRITER_DESTROYPARTITIONS) | 56 IMAGEWRITER_DESTROYPARTITIONS) |
57 ImageWriterPrivateDestroyPartitionsFunction(); | 57 ImageWriterPrivateDestroyPartitionsFunction(); |
58 | 58 |
59 private: | 59 private: |
60 virtual ~ImageWriterPrivateDestroyPartitionsFunction(); | 60 virtual ~ImageWriterPrivateDestroyPartitionsFunction(); |
61 virtual bool RunAsync() OVERRIDE; | 61 virtual bool RunAsync() override; |
62 void OnDestroyComplete(bool success, const std::string& error); | 62 void OnDestroyComplete(bool success, const std::string& error); |
63 }; | 63 }; |
64 | 64 |
65 class ImageWriterPrivateListRemovableStorageDevicesFunction | 65 class ImageWriterPrivateListRemovableStorageDevicesFunction |
66 : public ChromeAsyncExtensionFunction { | 66 : public ChromeAsyncExtensionFunction { |
67 public: | 67 public: |
68 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.listRemovableStorageDevices", | 68 DECLARE_EXTENSION_FUNCTION("imageWriterPrivate.listRemovableStorageDevices", |
69 IMAGEWRITER_LISTREMOVABLESTORAGEDEVICES); | 69 IMAGEWRITER_LISTREMOVABLESTORAGEDEVICES); |
70 ImageWriterPrivateListRemovableStorageDevicesFunction(); | 70 ImageWriterPrivateListRemovableStorageDevicesFunction(); |
71 | 71 |
72 private: | 72 private: |
73 virtual ~ImageWriterPrivateListRemovableStorageDevicesFunction(); | 73 virtual ~ImageWriterPrivateListRemovableStorageDevicesFunction(); |
74 virtual bool RunAsync() OVERRIDE; | 74 virtual bool RunAsync() override; |
75 void OnDeviceListReady(scoped_refptr<StorageDeviceList> device_list, | 75 void OnDeviceListReady(scoped_refptr<StorageDeviceList> device_list, |
76 bool success); | 76 bool success); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace extensions | 79 } // namespace extensions |
80 | 80 |
81 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_PRIVA
TE_API_H_ | 81 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_PRIVA
TE_API_H_ |
OLD | NEW |