summaryrefslogtreecommitdiffstats
path: root/content/browser/mojo
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-14 12:13:23 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-14 12:15:06 +0000
commitf1652c9eb3f30ae80757b87b8978b570efa9810e (patch)
treeec6153ca3872ca186a7fd86a384e24967d8cecf9 /content/browser/mojo
parentcc3dd4244d3496e7f1d28d66ff39bdb2dd8e678c (diff)
downloadchromium_src-f1652c9eb3f30ae80757b87b8978b570efa9810e.zip
chromium_src-f1652c9eb3f30ae80757b87b8978b570efa9810e.tar.gz
chromium_src-f1652c9eb3f30ae80757b87b8978b570efa9810e.tar.bz2
Mojo: Add the ability to notify a Mojo Channel that it's going to be destroyed soon.
* The actual destruction will typically happen on a different thread. * We'd like to suppress warnings about the OS "pipe" being broken (which it often will, because we kill processes rather than shut them down). * We'd like to know if we're still sending stuff on the channel even though it's about to go away. R=yzshen@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/472603002 Cr-Commit-Position: refs/heads/master@{#289531} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/mojo')
-rw-r--r--content/browser/mojo/mojo_application_host.cc4
-rw-r--r--content/browser/mojo/mojo_application_host.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc
index 2491252..3af7974 100644
--- a/content/browser/mojo/mojo_application_host.cc
+++ b/content/browser/mojo/mojo_application_host.cc
@@ -59,4 +59,8 @@ bool MojoApplicationHost::Activate(IPC::Sender* sender,
return did_activate_;
}
+void MojoApplicationHost::WillDestroySoon() {
+ channel_init_.WillDestroySoon();
+}
+
} // namespace content
diff --git a/content/browser/mojo/mojo_application_host.h b/content/browser/mojo/mojo_application_host.h
index ae57104..27a43f8 100644
--- a/content/browser/mojo/mojo_application_host.h
+++ b/content/browser/mojo/mojo_application_host.h
@@ -32,6 +32,8 @@ class MojoApplicationHost {
bool Init();
bool Activate(IPC::Sender* sender, base::ProcessHandle process_handle);
+ void WillDestroySoon();
+
bool did_activate() const { return did_activate_; }
ServiceRegistry* service_registry() { return &service_registry_; }