OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ |
6 #define PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ | 6 #define PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 23 matching lines...) Expand all Loading... |
34 gfx::Size GetPdfPaperSizeDeviceUnits() override; | 34 gfx::Size GetPdfPaperSizeDeviceUnits() override; |
35 Result UpdatePrinterSettings(bool external_preview, | 35 Result UpdatePrinterSettings(bool external_preview, |
36 bool show_system_dialog, | 36 bool show_system_dialog, |
37 int page_count) override; | 37 int page_count) override; |
38 Result NewDocument(const base::string16& document_name) override; | 38 Result NewDocument(const base::string16& document_name) override; |
39 Result NewPage() override; | 39 Result NewPage() override; |
40 Result PageDone() override; | 40 Result PageDone() override; |
41 Result DocumentDone() override; | 41 Result DocumentDone() override; |
42 void Cancel() override; | 42 void Cancel() override; |
43 void ReleaseContext() override; | 43 void ReleaseContext() override; |
44 gfx::NativeDrawingContext context() const override; | 44 skia::NativeDrawingContext context() const override; |
45 | 45 |
46 Result StreamData(const std::vector<char>& buffer); | 46 Result StreamData(const std::vector<char>& buffer); |
47 | 47 |
48 private: | 48 private: |
49 // Lazily initializes |printer_|. | 49 // Lazily initializes |printer_|. |
50 Result InitializeDevice(const std::string& device); | 50 Result InitializeDevice(const std::string& device); |
51 | 51 |
52 // id for ongoing print job. 0 if no job is active. | 52 // id for ongoing print job. 0 if no job is active. |
53 int job_id_; | 53 int job_id_; |
54 | 54 |
55 CupsConnection connection_; | 55 CupsConnection connection_; |
56 std::unique_ptr<CupsPrinter> printer_; | 56 std::unique_ptr<CupsPrinter> printer_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(PrintingContextChromeos); | 58 DISALLOW_COPY_AND_ASSIGN(PrintingContextChromeos); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace printing | 61 } // namespace printing |
62 | 62 |
63 #endif // PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ | 63 #endif // PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ |
OLD | NEW |