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/aura_demo | |
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/aura_demo')
-rw-r--r-- | mojo/examples/aura_demo/aura_demo.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mojo/examples/aura_demo/aura_demo.cc b/mojo/examples/aura_demo/aura_demo.cc index 4f88dfb..263493f 100644 --- a/mojo/examples/aura_demo/aura_demo.cc +++ b/mojo/examples/aura_demo/aura_demo.cc @@ -152,6 +152,10 @@ class AuraDemo : public ApplicationDelegate, window_tree_host_->Show(); } + virtual void OnViewManagerDisconnected( + view_manager::ViewManager* view_manager) OVERRIDE { + base::MessageLoop::current()->Quit(); + } // WindowTreeHostMojoDelegate: virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE { |