| OLD | NEW |
| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // an Send method. | 92 // an Send method. |
| 93 bool Send(IPC::Message* message) { | 93 bool Send(IPC::Message* message) { |
| 94 return SendOnChannel(message); | 94 return SendOnChannel(message); |
| 95 } | 95 } |
| 96 | 96 |
| 97 protected: | 97 protected: |
| 98 // Allows this method to be overridden for tests. | 98 // Allows this method to be overridden for tests. |
| 99 virtual FilePath GetUtilityProcessCmd(); | 99 virtual FilePath GetUtilityProcessCmd(); |
| 100 | 100 |
| 101 // Overriden from ChildProcessHost. | 101 // Overriden from ChildProcessHost. |
| 102 virtual bool CanShutdown() { return true; } | 102 virtual bool CanShutdown(); |
| 103 virtual void OnChildDied(); | 103 virtual void OnChildDied(); |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 // Starts a process. Returns true iff it succeeded. | 106 // Starts a process. Returns true iff it succeeded. |
| 107 bool StartProcess(const FilePath& exposed_dir); | 107 bool StartProcess(const FilePath& exposed_dir); |
| 108 | 108 |
| 109 // IPC messages: | 109 // IPC messages: |
| 110 virtual void OnMessageReceived(const IPC::Message& message); | 110 virtual void OnMessageReceived(const IPC::Message& message); |
| 111 // Called when at least one page in the specified PDF has been rendered | 111 // Called when at least one page in the specified PDF has been rendered |
| 112 // successfully into metafile_path_; | 112 // successfully into metafile_path_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 124 bool waiting_for_reply_; | 124 bool waiting_for_reply_; |
| 125 // The path to the temp file where the metafile will be written to. | 125 // The path to the temp file where the metafile will be written to. |
| 126 FilePath metafile_path_; | 126 FilePath metafile_path_; |
| 127 // The temporary folder created for the metafile. | 127 // The temporary folder created for the metafile. |
| 128 scoped_ptr<ScopedTempDir> scratch_metafile_dir_; | 128 scoped_ptr<ScopedTempDir> scratch_metafile_dir_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); | 130 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ | 133 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ |
| OLD | NEW |