summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/broker_dispatcher.cc
diff options
context:
space:
mode:
authorddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 22:51:08 +0000
committerddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 22:51:08 +0000
commit4b417e55e37a4d9d347a0dfbfc5350f55569819f (patch)
tree1e93f2f2510c8e1d7a596dbf9aaec4bdd8ed1f87 /ppapi/proxy/broker_dispatcher.cc
parent5d15b27b0e135a5353bd8150d42be1d1ed6d1871 (diff)
downloadchromium_src-4b417e55e37a4d9d347a0dfbfc5350f55569819f.zip
chromium_src-4b417e55e37a4d9d347a0dfbfc5350f55569819f.tar.gz
chromium_src-4b417e55e37a4d9d347a0dfbfc5350f55569819f.tar.bz2
Fix two bugs in proxying of Broker Connect callback and shutdown Broker when renderer exits.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6882020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/broker_dispatcher.cc')
-rw-r--r--ppapi/proxy/broker_dispatcher.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/ppapi/proxy/broker_dispatcher.cc b/ppapi/proxy/broker_dispatcher.cc
index ff86212..087e9fc 100644
--- a/ppapi/proxy/broker_dispatcher.cc
+++ b/ppapi/proxy/broker_dispatcher.cc
@@ -84,5 +84,30 @@ BrokerHostDispatcher::BrokerHostDispatcher(
: BrokerDispatcher(remote_process_handle, NULL) {
}
+void BrokerHostDispatcher::OnChannelError() {
+ BrokerDispatcher::OnChannelError(); // Stop using the channel.
+
+ // Tell the host about the crash so it can clean up and display notification.
+ // TODO(ddorwin): Add BrokerCrashed() to PPB_Proxy_Private and call it.
+ // ppb_proxy_->BrokerCrashed(pp_module());
+}
+
+BrokerSideDispatcher::BrokerSideDispatcher(
+ base::ProcessHandle remote_process_handle,
+ PP_ConnectInstance_Func connect_instance)
+ : BrokerDispatcher(remote_process_handle, connect_instance) {
+}
+
+void BrokerSideDispatcher::OnChannelError() {
+ BrokerDispatcher::OnChannelError();
+
+ // The renderer has crashed or exited. This channel and all instances
+ // associated with it are no longer valid.
+ // TODO(ddorwin): This causes the broker process to exit, which may not be
+ // desirable in some use cases.
+ delete this;
+}
+
+
} // namespace proxy
} // namespace pp