| 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_PRINTER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/strings/string16.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class DictionaryValue; | 16 class DictionaryValue; |
| 16 class ListValue; | 17 class ListValue; |
| 17 class RefCountedMemory; | 18 class RefCountedMemory; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class BrowserContext; | 22 class BrowserContext; |
| 22 } | 23 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 55 |
| 55 // Starts getting printing capability of the printer with the provided | 56 // Starts getting printing capability of the printer with the provided |
| 56 // destination ID. | 57 // destination ID. |
| 57 // |callback| should be called in the response to the request. | 58 // |callback| should be called in the response to the request. |
| 58 virtual void StartGetCapability(const std::string& destination_id, | 59 virtual void StartGetCapability(const std::string& destination_id, |
| 59 const GetCapabilityCallback& callback) = 0; | 60 const GetCapabilityCallback& callback) = 0; |
| 60 | 61 |
| 61 // Starts a print request. | 62 // Starts a print request. |
| 62 // |destination_id|: The printer to which print job should be sent. | 63 // |destination_id|: The printer to which print job should be sent. |
| 63 // |capability|: Capability reported by the printer. | 64 // |capability|: Capability reported by the printer. |
| 65 // |job_title|: The title used for print job. |
| 64 // |ticket_json|: The print job ticket as JSON string. | 66 // |ticket_json|: The print job ticket as JSON string. |
| 65 // |page_size|: The document page size. | 67 // |page_size|: The document page size. |
| 66 // |print_data|: The document bytes to print. | 68 // |print_data|: The document bytes to print. |
| 67 // |callback| should be called in the response to the request. | 69 // |callback| should be called in the response to the request. |
| 68 // TODO(tbarzic): Page size should be extracted from print data. | 70 // TODO(tbarzic): Page size should be extracted from print data. |
| 69 virtual void StartPrint( | 71 virtual void StartPrint( |
| 70 const std::string& destination_id, | 72 const std::string& destination_id, |
| 71 const std::string& capability, | 73 const std::string& capability, |
| 74 const base::string16& job_title, |
| 72 const std::string& ticket_json, | 75 const std::string& ticket_json, |
| 73 const gfx::Size& page_size, | 76 const gfx::Size& page_size, |
| 74 const scoped_refptr<base::RefCountedMemory>& print_data, | 77 const scoped_refptr<base::RefCountedMemory>& print_data, |
| 75 const PrintCallback& callback) = 0; | 78 const PrintCallback& callback) = 0; |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ | 81 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ |
| OLD | NEW |