Index: chrome/utility/chrome_content_utility_client.h |
diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h |
index f2eee64331e8188c2265647d196bc487379fc8eb..23c328b59e2d207b77725b9ae60ac7fb3126e114 100644 |
--- a/chrome/utility/chrome_content_utility_client.h |
+++ b/chrome/utility/chrome_content_utility_client.h |
@@ -42,6 +42,14 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient { |
max_ipc_message_size_ = max_message_size; |
} |
+ // Reference counting for Mojo services. A reference count is incremented when |
+ // Mojo services are connected to, and decremented when the connection is |
+ // destroyed. When the count reaches 0, this process is freed. The assumption |
+ // is that multiple Mojo services can be connected to in the same utility |
+ // process. This is a Mojo alternative to "batch mode" for Chrome IPC. |
+ void MojoRef(); |
sky
2015/04/01 15:00:45
Who is responsible for invoking these?
Anand Mistry (off Chromium)
2015/04/02 04:29:45
Added a blurb to describe this. At this point, I'm
sky
2015/04/02 17:20:10
Having to explicitly invoke functions like this is
Anand Mistry (off Chromium)
2015/04/08 07:14:15
On further thought, there are races with this kind
|
+ void MojoUnref(); |
+ |
private: |
// IPC message handlers. |
void OnUnpackWebResource(const std::string& resource_data); |
@@ -89,6 +97,8 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient { |
// Maximum IPC msg size (default to kMaximumMessageSize; override for testing) |
static int64_t max_ipc_message_size_; |
+ int32_t mojo_service_ref_count_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); |
}; |