diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-11 20:25:20 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-11 20:25:20 +0000 |
commit | 4e72e787a8120681c4c7c96071ff5f2c0fa9f7fd (patch) | |
tree | bd4c57f3366114d980bcae293653a14577aba4e0 /mojo/examples/compositor_app | |
parent | 782a8e944d0276660e8c8c54b9d4db33b05473ca (diff) | |
download | chromium_src-4e72e787a8120681c4c7c96071ff5f2c0fa9f7fd.zip chromium_src-4e72e787a8120681c4c7c96071ff5f2c0fa9f7fd.tar.gz chromium_src-4e72e787a8120681c4c7c96071ff5f2c0fa9f7fd.tar.bz2 |
Attempt at cleaning up a bunch of shutdown issues.
1. Defers command buffer destruction until after the native viewport client has had a chance to cleanup.
2. Destroy the compositor before quitting the view manager message loop.
3. Make various NodeObservers properly unhook themselves as node/view observers during destruction and view swapping.
4. Adds a "ViewManagerDisconnected" method to ViewManagerDelegate to allow the application to exit when the connection to the view manager is closed. This is necessary in addition to root monitoring because for some connections (e.g. the root node->window manager) the root node is not destroyed. I'm not entirely happy with imposing this burden on application developers but I will try and tidy this up later.
5. Instantiate nested AtExitManagers only in a static build. In the component build we can use the shell's.
6. Adds a callback to notify the ViewManagerInitServiceImpl when the NativeViewport is destroyed. The VMISI uses this callback to close its connection to the view manager, which triggers the view manager to shut down.
Since this still crashes, I can't test this yet.
R=sky@chromium.org
http://crbug.com/325901
Review URL: https://codereview.chromium.org/372273004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/compositor_app')
-rw-r--r-- | mojo/examples/compositor_app/compositor_app.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/examples/compositor_app/compositor_app.cc b/mojo/examples/compositor_app/compositor_app.cc index 6a5a8c4..54aa235 100644 --- a/mojo/examples/compositor_app/compositor_app.cc +++ b/mojo/examples/compositor_app/compositor_app.cc @@ -39,8 +39,9 @@ class SampleApp : public ApplicationDelegate, public NativeViewportClient { virtual void OnCreated() OVERRIDE { } - virtual void OnDestroyed() OVERRIDE { + virtual void OnDestroyed(const mojo::Callback<void()>& callback) OVERRIDE { base::MessageLoop::current()->Quit(); + callback.Run(); } virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE { |