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

Side by Side Diff: chrome/service/cloud_print/print_system.h

Issue 5947002: As the first step in an effort to improve robustness of the cloud print proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 9 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback.h"
13 #include "base/ref_counted.h" 14 #include "base/ref_counted.h"
14 15
15 #include "printing/backend/print_backend.h" 16 #include "printing/backend/print_backend.h"
16 17
17 class DictionaryValue; 18 class DictionaryValue;
18 class FilePath; 19 class FilePath;
19 20
20 namespace printing { 21 namespace printing {
21 class PrintBackend; 22 class PrintBackend;
22 struct PrinterBasicInfo; 23 struct PrinterBasicInfo;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // or Delegate::OnJobSpoolFailed methods are called) can fail. 124 // or Delegate::OnJobSpoolFailed methods are called) can fail.
124 virtual bool Spool(const std::string& print_ticket, 125 virtual bool Spool(const std::string& print_ticket,
125 const FilePath& print_data_file_path, 126 const FilePath& print_data_file_path,
126 const std::string& print_data_mime_type, 127 const std::string& print_data_mime_type,
127 const std::string& printer_name, 128 const std::string& printer_name,
128 const std::string& job_title, 129 const std::string& job_title,
129 const std::vector<std::string>& tags, 130 const std::vector<std::string>& tags,
130 JobSpooler::Delegate* delegate) = 0; 131 JobSpooler::Delegate* delegate) = 0;
131 }; 132 };
132 133
134 typedef Callback3<
135 bool,
136 const std::string&,
137 const printing::PrinterCapsAndDefaults&>::Type
138 PrinterCapsAndDefaultsCallback;
139
133 virtual ~PrintSystem(); 140 virtual ~PrintSystem();
134 141
135 // Initialize print system. This need to be called before any other function 142 // Initialize print system. This need to be called before any other function
136 // of PrintSystem. 143 // of PrintSystem.
137 virtual void Init() = 0; 144 virtual void Init() = 0;
138 145
139 // Enumerates the list of installed local and network printers. 146 // Enumerates the list of installed local and network printers.
140 virtual void EnumeratePrinters(printing::PrinterList* printer_list) = 0; 147 virtual void EnumeratePrinters(printing::PrinterList* printer_list) = 0;
141 148
142 // Gets the capabilities and defaults for a specific printer. 149 // Gets the capabilities and defaults for a specific printer asynchronously.
143 virtual bool GetPrinterCapsAndDefaults( 150 virtual void GetPrinterCapsAndDefaults(
144 const std::string& printer_name, 151 const std::string& printer_name,
145 printing::PrinterCapsAndDefaults* printer_info) = 0; 152 PrinterCapsAndDefaultsCallback* callback) = 0;
146 153
147 // Returns true if printer_name points to a valid printer. 154 // Returns true if printer_name points to a valid printer.
148 virtual bool IsValidPrinter(const std::string& printer_name) = 0; 155 virtual bool IsValidPrinter(const std::string& printer_name) = 0;
149 156
150 // Returns true if ticket is valid. 157 // Returns true if ticket is valid.
151 virtual bool ValidatePrintTicket(const std::string& printer_name, 158 virtual bool ValidatePrintTicket(const std::string& printer_name,
152 const std::string& print_ticket_data) = 0; 159 const std::string& print_ticket_data) = 0;
153 160
154 // Get details for already spooled job. 161 // Get details for already spooled job.
155 virtual bool GetJobDetails(const std::string& printer_name, 162 virtual bool GetJobDetails(const std::string& printer_name,
(...skipping 22 matching lines...) Expand all
178 // Visual Studio where it gets confused between multiple Delegate 185 // Visual Studio where it gets confused between multiple Delegate
179 // classes and gives a C2500 error. (I saw this error on the try bots - 186 // classes and gives a C2500 error. (I saw this error on the try bots -
180 // the workaround was not needed for my machine). 187 // the workaround was not needed for my machine).
181 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; 188 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate;
182 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; 189 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate;
183 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; 190 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate;
184 191
185 } // namespace cloud_print 192 } // namespace cloud_print
186 193
187 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 194 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy_backend.cc ('k') | chrome/service/cloud_print/print_system_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698