| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // General functions --------------------------------------------------------- | 78 // General functions --------------------------------------------------------- |
| 79 | 79 |
| 80 ~RenderProcessHost() override {} | 80 ~RenderProcessHost() override {} |
| 81 | 81 |
| 82 // Initialize the new renderer process, returning true on success. This must | 82 // Initialize the new renderer process, returning true on success. This must |
| 83 // be called once before the object can be used, but can be called after | 83 // be called once before the object can be used, but can be called after |
| 84 // that with no effect. Therefore, if the caller isn't sure about whether | 84 // that with no effect. Therefore, if the caller isn't sure about whether |
| 85 // the process has been created, it should just call Init(). | 85 // the process has been created, it should just call Init(). |
| 86 virtual bool Init() = 0; | 86 virtual bool Init() = 0; |
| 87 | 87 |
| 88 // Ensures that a Channel exists and is at least queueing outgoing messages |
| 89 // if there isn't a render process connected to it yet. This may be used to |
| 90 // ensure that in the event of a renderer crash and restart, subsequent |
| 91 // messages sent via Send() will eventually reach the new process. |
| 92 virtual void EnsureHasChannel() = 0; |
| 93 |
| 88 // Gets the next available routing id. | 94 // Gets the next available routing id. |
| 89 virtual int GetNextRoutingID() = 0; | 95 virtual int GetNextRoutingID() = 0; |
| 90 | 96 |
| 91 // These methods add or remove listener for a specific message routing ID. | 97 // These methods add or remove listener for a specific message routing ID. |
| 92 // Used for refcounting, each holder of this object must AddRoute and | 98 // Used for refcounting, each holder of this object must AddRoute and |
| 93 // RemoveRoute. This object should be allocated on the heap; when no | 99 // RemoveRoute. This object should be allocated on the heap; when no |
| 94 // listeners own it any more, it will delete itself. | 100 // listeners own it any more, it will delete itself. |
| 95 virtual void AddRoute(int32_t routing_id, IPC::Listener* listener) = 0; | 101 virtual void AddRoute(int32_t routing_id, IPC::Listener* listener) = 0; |
| 96 virtual void RemoveRoute(int32_t routing_id) = 0; | 102 virtual void RemoveRoute(int32_t routing_id) = 0; |
| 97 | 103 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 static void SetMaxRendererProcessCount(size_t count); | 386 static void SetMaxRendererProcessCount(size_t count); |
| 381 | 387 |
| 382 // Returns the current maximum number of renderer process hosts kept by the | 388 // Returns the current maximum number of renderer process hosts kept by the |
| 383 // content module. | 389 // content module. |
| 384 static size_t GetMaxRendererProcessCount(); | 390 static size_t GetMaxRendererProcessCount(); |
| 385 }; | 391 }; |
| 386 | 392 |
| 387 } // namespace content. | 393 } // namespace content. |
| 388 | 394 |
| 389 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 395 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |