OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/service/service_utility_process_host.h" | 5 #include "chrome/service/service_utility_process_host.h" |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
12 #include "base/scoped_temp_dir.h" | 12 #include "base/scoped_temp_dir.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/utility_messages.h" | 14 #include "chrome/common/utility_messages.h" |
15 #include "gfx/rect.h" | 15 #include "gfx/rect.h" |
16 #include "ipc/ipc_switches.h" | 16 #include "ipc/ipc_switches.h" |
17 #include "printing/native_metafile.h" | 17 #include "printing/native_metafile.h" |
18 #include "printing/page_range.h" | 18 #include "printing/page_range.h" |
| 19 #include "ui/base/ui_base_switches.h" |
19 | 20 |
20 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
21 #include "base/win/scoped_handle.h" | 22 #include "base/win/scoped_handle.h" |
22 #endif | 23 #endif |
23 | 24 |
24 ServiceUtilityProcessHost::ServiceUtilityProcessHost( | 25 ServiceUtilityProcessHost::ServiceUtilityProcessHost( |
25 Client* client, base::MessageLoopProxy* client_message_loop_proxy) | 26 Client* client, base::MessageLoopProxy* client_message_loop_proxy) |
26 : ServiceChildProcessHost(ChildProcessInfo::UTILITY_PROCESS), | 27 : ServiceChildProcessHost(ChildProcessInfo::UTILITY_PROCESS), |
27 client_(client), | 28 client_(client), |
28 client_message_loop_proxy_(client_message_loop_proxy), | 29 client_message_loop_proxy_(client_message_loop_proxy), |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 if (!metafile.CreateFromFile(metafile_path)) { | 206 if (!metafile.CreateFromFile(metafile_path)) { |
206 OnRenderPDFPagesToMetafileFailed(); | 207 OnRenderPDFPagesToMetafileFailed(); |
207 } else { | 208 } else { |
208 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number); | 209 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number); |
209 // Close it so that ScopedTempDir can delete the folder. | 210 // Close it so that ScopedTempDir can delete the folder. |
210 metafile.CloseEmf(); | 211 metafile.CloseEmf(); |
211 } | 212 } |
212 #endif // defined(OS_WIN) | 213 #endif // defined(OS_WIN) |
213 } | 214 } |
214 | 215 |
OLD | NEW |