Commit a2603add authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

RemoteMacViews: Close window on process exit

Process death should be treated as window exit. Tested using a process
kill.

Bug: 898627
Change-Id: I4e659dfeb71541ac2e111979842eda40110d7a66
Reviewed-on: https://chromium-review.googlesource.com/c/1298297Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602473}
parent 0aae4472
...@@ -493,7 +493,17 @@ void BridgedNativeWidgetHostImpl::OnBridgeFactoryHostDestroying( ...@@ -493,7 +493,17 @@ void BridgedNativeWidgetHostImpl::OnBridgeFactoryHostDestroying(
DCHECK_EQ(host, bridge_factory_host_); DCHECK_EQ(host, bridge_factory_host_);
bridge_factory_host_->RemoveObserver(this); bridge_factory_host_->RemoveObserver(this);
bridge_factory_host_ = nullptr; bridge_factory_host_ = nullptr;
// TODO(ccameron): This should be treated as the window closing.
// Because the process hosting this window has ended, close the window by
// sending the window close messages that the bridge would have sent.
OnWindowWillClose();
// Explicitly propagate this message to all children (they are also observers,
// but may not be destroyed before |this| is destroyed, which would violate
// tear-down assumptions). This would have been done by the bridge, had it
// shut down cleanly.
while (!children_.empty())
children_.front()->OnBridgeFactoryHostDestroying(host);
OnWindowHasClosed();
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment