OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/mus/mus_client.h" | 5 #include "ui/views/mus/mus_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "components/discardable_memory/client/client_discardable_shared_memory_
manager.h" | 10 #include "components/discardable_memory/client/client_discardable_shared_memory_
manager.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 window_tree_client_.reset(); | 121 window_tree_client_.reset(); |
122 ui::OSExchangeDataProviderFactory::SetFactory(nullptr); | 122 ui::OSExchangeDataProviderFactory::SetFactory(nullptr); |
123 ui::Clipboard::DestroyClipboardForCurrentThread(); | 123 ui::Clipboard::DestroyClipboardForCurrentThread(); |
124 gpu_.reset(); | 124 gpu_.reset(); |
125 | 125 |
126 if (ViewsDelegate::GetInstance()) { | 126 if (ViewsDelegate::GetInstance()) { |
127 ViewsDelegate::GetInstance()->set_native_widget_factory( | 127 ViewsDelegate::GetInstance()->set_native_widget_factory( |
128 ViewsDelegate::NativeWidgetFactory()); | 128 ViewsDelegate::NativeWidgetFactory()); |
129 } | 129 } |
130 | 130 |
| 131 base::DiscardableMemoryAllocator::SetInstance(nullptr); |
131 DCHECK_EQ(instance_, this); | 132 DCHECK_EQ(instance_, this); |
132 instance_ = nullptr; | 133 instance_ = nullptr; |
133 } | 134 } |
134 | 135 |
135 // static | 136 // static |
136 bool MusClient::ShouldCreateDesktopNativeWidgetAura( | 137 bool MusClient::ShouldCreateDesktopNativeWidgetAura( |
137 const Widget::InitParams& init_params) { | 138 const Widget::InitParams& init_params) { |
138 // TYPE_CONTROL and child widgets require a NativeWidgetAura. | 139 // TYPE_CONTROL and child widgets require a NativeWidgetAura. |
139 return init_params.type != Widget::InitParams::TYPE_CONTROL && | 140 return init_params.type != Widget::InitParams::TYPE_CONTROL && |
140 !init_params.child; | 141 !init_params.child; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 return root->GetTopWindowContainingPoint(relative_point); | 276 return root->GetTopWindowContainingPoint(relative_point); |
276 } | 277 } |
277 return nullptr; | 278 return nullptr; |
278 } | 279 } |
279 | 280 |
280 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { | 281 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { |
281 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 282 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
282 } | 283 } |
283 | 284 |
284 } // namespace views | 285 } // namespace views |
OLD | NEW |