| Index: ui/views/mus/window_manager_connection.cc
|
| diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
|
| index 237b5b92619fa59e37db8e905b5b7dbdb7d4bcfe..ba6ee9491ad8dc71e4869f11f7379bc1d54bf526 100644
|
| --- a/ui/views/mus/window_manager_connection.cc
|
| +++ b/ui/views/mus/window_manager_connection.cc
|
| @@ -36,6 +36,20 @@ base::LazyInstance<WindowManagerConnectionPtr>::Leaky lazy_tls_ptr =
|
|
|
| } // namespace
|
|
|
| +WindowManagerConnection::~WindowManagerConnection() {
|
| + // ~WindowTreeClient calls back to us (we're its delegate), destroy it while
|
| + // we are still valid.
|
| + client_.reset();
|
| + ui::Clipboard::DestroyClipboardForCurrentThread();
|
| + ui::GpuService::Terminate();
|
| + lazy_tls_ptr.Pointer()->Set(nullptr);
|
| +
|
| + if (ViewsDelegate::GetInstance()) {
|
| + ViewsDelegate::GetInstance()->set_native_widget_factory(
|
| + ViewsDelegate::NativeWidgetFactory());
|
| + }
|
| +}
|
| +
|
| // static
|
| std::unique_ptr<WindowManagerConnection> WindowManagerConnection::Create(
|
| shell::Connector* connector,
|
| @@ -156,20 +170,6 @@ WindowManagerConnection::WindowManagerConnection(
|
| std::map<std::string, std::vector<uint8_t>>()));
|
| }
|
|
|
| -WindowManagerConnection::~WindowManagerConnection() {
|
| - // ~WindowTreeClient calls back to us (we're its delegate), destroy it while
|
| - // we are still valid.
|
| - client_.reset();
|
| - ui::Clipboard::DestroyClipboardForCurrentThread();
|
| - ui::GpuService::Terminate();
|
| - lazy_tls_ptr.Pointer()->Set(nullptr);
|
| -
|
| - if (ViewsDelegate::GetInstance()) {
|
| - ViewsDelegate::GetInstance()->set_native_widget_factory(
|
| - ViewsDelegate::NativeWidgetFactory());
|
| - }
|
| -}
|
| -
|
| bool WindowManagerConnection::HasPointerDownWatcher() {
|
| // Check to see if we really have any observers left. This doesn't use
|
| // base::ObserverList<>::might_have_observers() because that returns true
|
|
|