| OLD | NEW |
| 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 CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Returns whether this process is using the same StoragePartition as | 149 // Returns whether this process is using the same StoragePartition as |
| 150 // |partition|. | 150 // |partition|. |
| 151 virtual bool InSameStoragePartition(StoragePartition* partition) const = 0; | 151 virtual bool InSameStoragePartition(StoragePartition* partition) const = 0; |
| 152 | 152 |
| 153 // Returns the unique ID for this child process host. This can be used later | 153 // Returns the unique ID for this child process host. This can be used later |
| 154 // in a call to FromID() to get back to this object (this is used to avoid | 154 // in a call to FromID() to get back to this object (this is used to avoid |
| 155 // sending non-threadsafe pointers to other threads). | 155 // sending non-threadsafe pointers to other threads). |
| 156 // | 156 // |
| 157 // This ID will be unique across all child process hosts, including workers, | 157 // This ID will be unique across all child process hosts, including workers, |
| 158 // plugins, etc. | 158 // plugins, etc. |
| 159 // |
| 160 // This will never return ChildProcessHost::kInvalidChildProcessUniqueId. |
| 159 virtual int GetID() const = 0; | 161 virtual int GetID() const = 0; |
| 160 | 162 |
| 161 // Returns true iff channel_ has been set to non-NULL. Use this for checking | 163 // Returns true iff channel_ has been set to non-NULL. Use this for checking |
| 162 // if there is connection or not. Virtual for mocking out for tests. | 164 // if there is connection or not. Virtual for mocking out for tests. |
| 163 virtual bool HasConnection() const = 0; | 165 virtual bool HasConnection() const = 0; |
| 164 | 166 |
| 165 // Call this to allow queueing of IPC messages that are sent before the | 167 // Call this to allow queueing of IPC messages that are sent before the |
| 166 // process is launched. | 168 // process is launched. |
| 167 virtual void EnableSendQueue() = 0; | 169 virtual void EnableSendQueue() = 0; |
| 168 | 170 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // module. | 276 // module. |
| 275 static size_t GetMaxRendererProcessCount(); | 277 static size_t GetMaxRendererProcessCount(); |
| 276 | 278 |
| 277 static void RegisterRendererMainThreadFactory( | 279 static void RegisterRendererMainThreadFactory( |
| 278 RendererMainThreadFactoryFunction create); | 280 RendererMainThreadFactoryFunction create); |
| 279 }; | 281 }; |
| 280 | 282 |
| 281 } // namespace content. | 283 } // namespace content. |
| 282 | 284 |
| 283 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 285 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |