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

Side by Side Diff: chrome/service/service_utility_process_host.h

Issue 568633002: Extracted MetafilePlayer interface from printing::MetafilePlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_expose
Patch Set: Thu Sep 11 22:54:16 PDT 2014 Created 6 years, 3 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 | « chrome/service/cloud_print/print_system_win.cc ('k') | printing/BUILD.gn » ('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 (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_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ 5 #ifndef CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
6 #define CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ 6 #define CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 12 matching lines...) Expand all
23 class CommandLine; 23 class CommandLine;
24 class MessageLoopProxy; 24 class MessageLoopProxy;
25 class ScopedTempDir; 25 class ScopedTempDir;
26 } // namespace base 26 } // namespace base
27 27
28 namespace content { 28 namespace content {
29 class ChildProcessHost; 29 class ChildProcessHost;
30 } 30 }
31 31
32 namespace printing { 32 namespace printing {
33 class Emf; 33 class MetafilePlayer;
34 struct PageRange; 34 struct PageRange;
35 struct PrinterCapsAndDefaults; 35 struct PrinterCapsAndDefaults;
36 struct PrinterSemanticCapsAndDefaults; 36 struct PrinterSemanticCapsAndDefaults;
37 } // namespace printing 37 } // namespace printing
38 38
39 // Acts as the service-side host to a utility child process. A 39 // Acts as the service-side host to a utility child process. A
40 // utility process is a short-lived sandboxed process that is created to run 40 // utility process is a short-lived sandboxed process that is created to run
41 // a specific task. 41 // a specific task.
42 class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { 42 class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate {
43 public: 43 public:
44 // Consumers of ServiceUtilityProcessHost must implement this interface to 44 // Consumers of ServiceUtilityProcessHost must implement this interface to
45 // get results back. All functions are called on the thread passed along 45 // get results back. All functions are called on the thread passed along
46 // to ServiceUtilityProcessHost. 46 // to ServiceUtilityProcessHost.
47 class Client : public base::RefCountedThreadSafe<Client> { 47 class Client : public base::RefCountedThreadSafe<Client> {
48 public: 48 public:
49 Client() {} 49 Client() {}
50 50
51 // Called when the child process died before a reply was receieved. 51 // Called when the child process died before a reply was receieved.
52 virtual void OnChildDied() {} 52 virtual void OnChildDied() {}
53 53
54 // Called when at least one page in the specified PDF has been rendered 54 // Called when at least one page in the specified PDF has been rendered
55 // successfully into |metafile|. 55 // successfully into |metafile|.
56 virtual void OnRenderPDFPagesToMetafileSucceeded( 56 virtual void OnRenderPDFPagesToMetafileSucceeded(
57 const printing::Emf& metafile, 57 const printing::MetafilePlayer& metafile,
58 int highest_rendered_page_number, 58 int highest_rendered_page_number,
59 double scale_factor) {} 59 double scale_factor) {}
60 // Called when no page in the passed in PDF could be rendered. 60 // Called when no page in the passed in PDF could be rendered.
61 virtual void OnRenderPDFPagesToMetafileFailed() {} 61 virtual void OnRenderPDFPagesToMetafileFailed() {}
62 62
63 // Called when the printer capabilities and defaults have been 63 // Called when the printer capabilities and defaults have been
64 // retrieved successfully or if retrieval failed. 64 // retrieved successfully or if retrieval failed.
65 virtual void OnGetPrinterCapsAndDefaults( 65 virtual void OnGetPrinterCapsAndDefaults(
66 bool succedded, 66 bool succedded,
67 const std::string& printer_name, 67 const std::string& printer_name,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 base::FilePath metafile_path_; 163 base::FilePath metafile_path_;
164 // The temporary folder created for the metafile. 164 // The temporary folder created for the metafile.
165 scoped_ptr<base::ScopedTempDir> scratch_metafile_dir_; 165 scoped_ptr<base::ScopedTempDir> scratch_metafile_dir_;
166 // Start time of operation. 166 // Start time of operation.
167 base::Time start_time_; 167 base::Time start_time_;
168 168
169 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); 169 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost);
170 }; 170 };
171 171
172 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ 172 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/print_system_win.cc ('k') | printing/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698