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 CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/strings/string16.h" |
13 #include "chrome/browser/ui/webui/print_preview/printer_handler.h" | 14 #include "chrome/browser/ui/webui/print_preview/printer_handler.h" |
14 #include "extensions/browser/api/printer_provider/printer_provider_api.h" | 15 #include "extensions/browser/api/printer_provider/printer_provider_api.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 class DictionaryValue; | 18 class DictionaryValue; |
18 class ListValue; | 19 class ListValue; |
19 class RefCountedMemory; | 20 class RefCountedMemory; |
20 class TaskRunner; | 21 class TaskRunner; |
21 } | 22 } |
22 | 23 |
(...skipping 29 matching lines...) Expand all Loading... |
52 // PrinterHandler implementation: | 53 // PrinterHandler implementation: |
53 void Reset() override; | 54 void Reset() override; |
54 void StartGetPrinters( | 55 void StartGetPrinters( |
55 const PrinterHandler::GetPrintersCallback& callback) override; | 56 const PrinterHandler::GetPrintersCallback& callback) override; |
56 void StartGetCapability( | 57 void StartGetCapability( |
57 const std::string& destination_id, | 58 const std::string& destination_id, |
58 const PrinterHandler::GetCapabilityCallback& calback) override; | 59 const PrinterHandler::GetCapabilityCallback& calback) override; |
59 // TODO(tbarzic): It might make sense to have the strings in a single struct. | 60 // TODO(tbarzic): It might make sense to have the strings in a single struct. |
60 void StartPrint(const std::string& destination_id, | 61 void StartPrint(const std::string& destination_id, |
61 const std::string& capability, | 62 const std::string& capability, |
| 63 const base::string16& job_title, |
62 const std::string& ticket_json, | 64 const std::string& ticket_json, |
63 const gfx::Size& page_size, | 65 const gfx::Size& page_size, |
64 const scoped_refptr<base::RefCountedMemory>& print_data, | 66 const scoped_refptr<base::RefCountedMemory>& print_data, |
65 const PrinterHandler::PrintCallback& callback) override; | 67 const PrinterHandler::PrintCallback& callback) override; |
66 | 68 |
67 private: | 69 private: |
68 friend class ExtensionPrinterHandlerTest; | 70 friend class ExtensionPrinterHandlerTest; |
69 | 71 |
70 void SetPwgRasterConverterForTesting( | 72 void SetPwgRasterConverterForTesting( |
71 scoped_ptr<local_discovery::PWGRasterConverter> pwg_raster_converter); | 73 scoped_ptr<local_discovery::PWGRasterConverter> pwg_raster_converter); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 scoped_ptr<local_discovery::PWGRasterConverter> pwg_raster_converter_; | 108 scoped_ptr<local_discovery::PWGRasterConverter> pwg_raster_converter_; |
107 | 109 |
108 scoped_refptr<base::TaskRunner> slow_task_runner_; | 110 scoped_refptr<base::TaskRunner> slow_task_runner_; |
109 | 111 |
110 base::WeakPtrFactory<ExtensionPrinterHandler> weak_ptr_factory_; | 112 base::WeakPtrFactory<ExtensionPrinterHandler> weak_ptr_factory_; |
111 | 113 |
112 DISALLOW_COPY_AND_ASSIGN(ExtensionPrinterHandler); | 114 DISALLOW_COPY_AND_ASSIGN(ExtensionPrinterHandler); |
113 }; | 115 }; |
114 | 116 |
115 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ | 117 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ |
OLD | NEW |