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

Side by Side Diff: trunk/src/chrome/browser/ui/webui/print_preview/print_preview_handler.h

Issue 319373004: Revert 275646 "Generalize printer color model handling, get rid ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual void OnPrivetPrintingError( 92 virtual void OnPrivetPrintingError(
93 const local_discovery::PrivetLocalPrintOperation* print_operation, 93 const local_discovery::PrivetLocalPrintOperation* print_operation,
94 int http_code) OVERRIDE; 94 int http_code) OVERRIDE;
95 #endif // ENABLE_SERVICE_DISCOVERY 95 #endif // ENABLE_SERVICE_DISCOVERY
96 int regenerate_preview_request_count() const { 96 int regenerate_preview_request_count() const {
97 return regenerate_preview_request_count_; 97 return regenerate_preview_request_count_;
98 } 98 }
99 99
100 private: 100 private:
101 class AccessTokenService; 101 class AccessTokenService;
102 struct CUPSPrinterColorModels;
102 103
103 static bool PrivetPrintingEnabled(); 104 static bool PrivetPrintingEnabled();
104 105
105 content::WebContents* preview_web_contents() const; 106 content::WebContents* preview_web_contents() const;
106 107
107 // Gets the list of printers. |args| is unused. 108 // Gets the list of printers. |args| is unused.
108 void HandleGetPrinters(const base::ListValue* args); 109 void HandleGetPrinters(const base::ListValue* args);
109 110
110 // Starts getting all local privet printers. |arg| is unused. 111 // Starts getting all local privet printers. |arg| is unused.
111 void HandleGetPrivetPrinters(const base::ListValue* args); 112 void HandleGetPrivetPrinters(const base::ListValue* args);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // Whether we have already logged the number of printers this session. 289 // Whether we have already logged the number of printers this session.
289 bool has_logged_printers_count_; 290 bool has_logged_printers_count_;
290 291
291 // Holds the path to the print to pdf request. It is empty if no such request 292 // Holds the path to the print to pdf request. It is empty if no such request
292 // exists. 293 // exists.
293 base::FilePath print_to_pdf_path_; 294 base::FilePath print_to_pdf_path_;
294 295
295 // Holds token service to get OAuth2 access tokens. 296 // Holds token service to get OAuth2 access tokens.
296 scoped_ptr<AccessTokenService> token_service_; 297 scoped_ptr<AccessTokenService> token_service_;
297 298
299 #if defined(USE_CUPS)
300 // The color capabilities from the last printer queried.
301 scoped_ptr<CUPSPrinterColorModels> cups_printer_color_models_;
302 #endif
303
298 #if defined(ENABLE_SERVICE_DISCOVERY) 304 #if defined(ENABLE_SERVICE_DISCOVERY)
299 scoped_refptr<local_discovery::ServiceDiscoverySharedClient> 305 scoped_refptr<local_discovery::ServiceDiscoverySharedClient>
300 service_discovery_client_; 306 service_discovery_client_;
301 scoped_ptr<local_discovery::PrivetLocalPrinterLister> printer_lister_; 307 scoped_ptr<local_discovery::PrivetLocalPrinterLister> printer_lister_;
302 308
303 scoped_ptr<local_discovery::PrivetHTTPAsynchronousFactory> 309 scoped_ptr<local_discovery::PrivetHTTPAsynchronousFactory>
304 privet_http_factory_; 310 privet_http_factory_;
305 scoped_ptr<local_discovery::PrivetHTTPResolution> privet_http_resolution_; 311 scoped_ptr<local_discovery::PrivetHTTPResolution> privet_http_resolution_;
306 scoped_ptr<local_discovery::PrivetHTTPClient> privet_http_client_; 312 scoped_ptr<local_discovery::PrivetHTTPClient> privet_http_client_;
307 scoped_ptr<local_discovery::PrivetJSONOperation> 313 scoped_ptr<local_discovery::PrivetJSONOperation>
308 privet_capabilities_operation_; 314 privet_capabilities_operation_;
309 scoped_ptr<local_discovery::PrivetLocalPrintOperation> 315 scoped_ptr<local_discovery::PrivetLocalPrintOperation>
310 privet_local_print_operation_; 316 privet_local_print_operation_;
311 #endif 317 #endif
312 318
313 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; 319 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_;
314 320
315 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 321 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
316 }; 322 };
317 323
318 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 324 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698