Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: printing/printing_context_chromeos.h

Issue 2383473004: Remove PrintingContext::InitWithSettings(). (Closed)
Patch Set: fix build Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « printing/printing_context_android.cc ('k') | printing/printing_context_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 // PrintingContext implementation. 28 // PrintingContext implementation.
29 void AskUserForSettings(int max_pages, 29 void AskUserForSettings(int max_pages,
30 bool has_selection, 30 bool has_selection,
31 bool is_scripted, 31 bool is_scripted,
32 const PrintSettingsCallback& callback) override; 32 const PrintSettingsCallback& callback) override;
33 Result UseDefaultSettings() override; 33 Result UseDefaultSettings() override;
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 InitWithSettings(const PrintSettings& settings) override;
39 Result NewDocument(const base::string16& document_name) override; 38 Result NewDocument(const base::string16& document_name) override;
40 Result NewPage() override; 39 Result NewPage() override;
41 Result PageDone() override; 40 Result PageDone() override;
42 Result DocumentDone() override; 41 Result DocumentDone() override;
43 void Cancel() override; 42 void Cancel() override;
44 void ReleaseContext() override; 43 void ReleaseContext() override;
45 gfx::NativeDrawingContext context() const override; 44 gfx::NativeDrawingContext context() const override;
46 45
47 Result StreamData(const std::vector<char>& buffer); 46 Result StreamData(const std::vector<char>& buffer);
48 47
49 private: 48 private:
50 // Lazily initializes |printer_|. 49 // Lazily initializes |printer_|.
51 Result InitializeDevice(const std::string& device); 50 Result InitializeDevice(const std::string& device);
52 51
53 // id for ongoing print job. 0 if no job is active. 52 // id for ongoing print job. 0 if no job is active.
54 int job_id_; 53 int job_id_;
55 54
56 CupsConnection connection_; 55 CupsConnection connection_;
57 std::unique_ptr<CupsPrinter> printer_; 56 std::unique_ptr<CupsPrinter> printer_;
58 57
59 DISALLOW_COPY_AND_ASSIGN(PrintingContextChromeos); 58 DISALLOW_COPY_AND_ASSIGN(PrintingContextChromeos);
60 }; 59 };
61 60
62 } // namespace printing 61 } // namespace printing
63 62
64 #endif // PRINTING_PRINTING_CONTEXT_CHROMEOS_H_ 63 #endif // PRINTING_PRINTING_CONTEXT_CHROMEOS_H_
OLDNEW
« no previous file with comments | « printing/printing_context_android.cc ('k') | printing/printing_context_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698