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 #ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ | 5 #ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ |
6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ | 6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 public: | 60 public: |
61 ServiceProcessState(); | 61 ServiceProcessState(); |
62 ~ServiceProcessState(); | 62 ~ServiceProcessState(); |
63 | 63 |
64 // Tries to become the sole service process for the current user data dir. | 64 // Tries to become the sole service process for the current user data dir. |
65 // Returns false if another service process is already running. | 65 // Returns false if another service process is already running. |
66 bool Initialize(); | 66 bool Initialize(); |
67 | 67 |
68 // Signal that the service process is ready. | 68 // Signal that the service process is ready. |
69 // This method is called when the service process is running and initialized. | 69 // This method is called when the service process is running and initialized. |
70 // |shutdown_task| is invoked when we get a shutdown request from another | 70 // |terminate_task| is invoked when we get a terminate request from another |
71 // process (in the same thread that called SignalReady). It can be NULL. | 71 // process (in the same thread that called SignalReady). It can be NULL. |
72 // |message_loop_proxy| must be of type IO and is the loop that POSIX uses | 72 // |message_loop_proxy| must be of type IO and is the loop that POSIX uses |
73 // to monitor the service process. | 73 // to monitor the service process. |
74 bool SignalReady( | 74 bool SignalReady( |
75 base::MessageLoopProxy* message_loop_proxy, Task* shutdown_task); | 75 base::MessageLoopProxy* message_loop_proxy, Task* terminate_task); |
76 | 76 |
77 // Signal that the service process is stopped. | 77 // Signal that the service process is stopped. |
78 void SignalStopped(); | 78 void SignalStopped(); |
79 | 79 |
80 // Register the service process to run on startup. | 80 // Register the service process to run on startup. |
81 bool AddToAutoRun(); | 81 bool AddToAutoRun(); |
82 | 82 |
83 // Unregister the service process to run on startup. | 83 // Unregister the service process to run on startup. |
84 bool RemoveFromAutoRun(); | 84 bool RemoveFromAutoRun(); |
85 | 85 |
(...skipping 27 matching lines...) Expand all Loading... |
113 | 113 |
114 // An opaque object that maintains state. The actual definition of this is | 114 // An opaque object that maintains state. The actual definition of this is |
115 // platform dependent. | 115 // platform dependent. |
116 struct StateData; | 116 struct StateData; |
117 StateData* state_; | 117 StateData* state_; |
118 scoped_ptr<base::SharedMemory> shared_mem_service_data_; | 118 scoped_ptr<base::SharedMemory> shared_mem_service_data_; |
119 scoped_ptr<CommandLine> autorun_command_line_; | 119 scoped_ptr<CommandLine> autorun_command_line_; |
120 }; | 120 }; |
121 | 121 |
122 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ | 122 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ |
OLD | NEW |