diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 10:07:38 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 10:07:38 +0000 |
commit | 2f262033a848841959f2d35d40f3d97b703e9684 (patch) | |
tree | 3f4ca60422ea84530991cc3c405e10a523446d68 /ui/aura/window_tree_host_win.cc | |
parent | a4b8e0898b53e7e57f27ee1726cf66a37a4660d3 (diff) | |
download | chromium_src-2f262033a848841959f2d35d40f3d97b703e9684.zip chromium_src-2f262033a848841959f2d35d40f3d97b703e9684.tar.gz chromium_src-2f262033a848841959f2d35d40f3d97b703e9684.tar.bz2 |
Invert the ownership relationship between WindowEventDispatcher and WindowTreeHost.
Prior to this change, WindowEventDispatcher owns WindowTreeHost. Code wishing to own an aura::Window hierarchy must create a WindowEventDispatcher, which will either create a default WTH implementation or use the one supplied by the caller.
This relationship made more sense long ago in the days when WED was called RootWindow, and served a purpose broader than just event dispatch bookkeeping. Those days are gone. For code using Aura, it makes more sense for them to create the WTH directly. I predict this may permit some simplification of shutdown code in some situations, since I think it is more intuitive to think of the destruction cascade initiating at the object that most closely binds to the platform accelerated widget. Today, ownership of the window tree sits with WED, which must destroy the window tree and the host.
This CL attempts to make as few changes as possible to invert the ownership. The effect of this is that there is a bunch of code left that probably only needs a WTH but instead has a WED. I will get around to cleaning these up in a future CL.
http://crbug.com/308843
R=sky@chromium.org
Review URL: https://codereview.chromium.org/180003006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_tree_host_win.cc')
-rw-r--r-- | ui/aura/window_tree_host_win.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc index 9187e04..2d592e5 100644 --- a/ui/aura/window_tree_host_win.cc +++ b/ui/aura/window_tree_host_win.cc @@ -53,6 +53,7 @@ WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds) WindowTreeHostWin::~WindowTreeHostWin() { DestroyCompositor(); + DestroyDispatcher(); DestroyWindow(hwnd()); } |