| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERN
AL_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERN
AL_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERN
AL_API_H_ | 6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERN
AL_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 PrinterProviderInternalGetPrintDataFunction(); | 147 PrinterProviderInternalGetPrintDataFunction(); |
| 148 | 148 |
| 149 protected: | 149 protected: |
| 150 ~PrinterProviderInternalGetPrintDataFunction() override; | 150 ~PrinterProviderInternalGetPrintDataFunction() override; |
| 151 ExtensionFunction::ResponseAction Run() override; | 151 ExtensionFunction::ResponseAction Run() override; |
| 152 | 152 |
| 153 private: | 153 private: |
| 154 void OnBlob(const std::string& type, | 154 void OnBlob(const std::string& type, |
| 155 int size, | 155 int size, |
| 156 const scoped_refptr<base::RefCountedMemory>& data, | 156 const scoped_refptr<base::RefCountedMemory>& data, |
| 157 scoped_ptr<content::BlobHandle> blob); | 157 std::unique_ptr<content::BlobHandle> blob); |
| 158 DECLARE_EXTENSION_FUNCTION("printerProviderInternal.getPrintData", | 158 DECLARE_EXTENSION_FUNCTION("printerProviderInternal.getPrintData", |
| 159 PRINTERPROVIDERINTERNAL_GETPRINTDATA) | 159 PRINTERPROVIDERINTERNAL_GETPRINTDATA) |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalGetPrintDataFunction); | 161 DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalGetPrintDataFunction); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 class PrinterProviderInternalReportUsbPrinterInfoFunction | 164 class PrinterProviderInternalReportUsbPrinterInfoFunction |
| 165 : public UIThreadExtensionFunction { | 165 : public UIThreadExtensionFunction { |
| 166 public: | 166 public: |
| 167 PrinterProviderInternalReportUsbPrinterInfoFunction(); | 167 PrinterProviderInternalReportUsbPrinterInfoFunction(); |
| 168 | 168 |
| 169 protected: | 169 protected: |
| 170 ~PrinterProviderInternalReportUsbPrinterInfoFunction() override; | 170 ~PrinterProviderInternalReportUsbPrinterInfoFunction() override; |
| 171 ExtensionFunction::ResponseAction Run() override; | 171 ExtensionFunction::ResponseAction Run() override; |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 DECLARE_EXTENSION_FUNCTION("printerProviderInternal.reportUsbPrinterInfo", | 174 DECLARE_EXTENSION_FUNCTION("printerProviderInternal.reportUsbPrinterInfo", |
| 175 PRINTERPROVIDERINTERNAL_REPORTUSBPRINTERINFO) | 175 PRINTERPROVIDERINTERNAL_REPORTUSBPRINTERINFO) |
| 176 | 176 |
| 177 DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalReportUsbPrinterInfoFunction); | 177 DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalReportUsbPrinterInfoFunction); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace extensions | 180 } // namespace extensions |
| 181 | 181 |
| 182 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INT
ERNAL_API_H_ | 182 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INT
ERNAL_API_H_ |
| OLD | NEW |