| 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 | 121 |
| 122 if (ViewsDelegate::GetInstance()) { | 122 if (ViewsDelegate::GetInstance()) { |
| 123 ViewsDelegate::GetInstance()->set_native_widget_factory( | 123 ViewsDelegate::GetInstance()->set_native_widget_factory( |
| 124 ViewsDelegate::NativeWidgetFactory()); | 124 ViewsDelegate::NativeWidgetFactory()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 base::DiscardableMemoryAllocator::SetInstance(nullptr); | 127 base::DiscardableMemoryAllocator::SetInstance(nullptr); |
| 128 DCHECK_EQ(instance_, this); | 128 DCHECK_EQ(instance_, this); |
| 129 instance_ = nullptr; | 129 instance_ = nullptr; |
| 130 DCHECK(aura::Env::GetInstance()); | 130 DCHECK(aura::Env::GetInstance()); |
| 131 fprintf(stderr, ">>>>%s\n", __PRETTY_FUNCTION__); |
| 131 } | 132 } |
| 132 | 133 |
| 133 // static | 134 // static |
| 134 bool MusClient::ShouldCreateDesktopNativeWidgetAura( | 135 bool MusClient::ShouldCreateDesktopNativeWidgetAura( |
| 135 const Widget::InitParams& init_params) { | 136 const Widget::InitParams& init_params) { |
| 136 // TYPE_CONTROL and child widgets require a NativeWidgetAura. | 137 // TYPE_CONTROL and child widgets require a NativeWidgetAura. |
| 137 return init_params.type != Widget::InitParams::TYPE_CONTROL && | 138 return init_params.type != Widget::InitParams::TYPE_CONTROL && |
| 138 !init_params.child; | 139 !init_params.child; |
| 139 } | 140 } |
| 140 | 141 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 return root->GetTopWindowContainingPoint(relative_point); | 270 return root->GetTopWindowContainingPoint(relative_point); |
| 270 } | 271 } |
| 271 return nullptr; | 272 return nullptr; |
| 272 } | 273 } |
| 273 | 274 |
| 274 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { | 275 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { |
| 275 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 276 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
| 276 } | 277 } |
| 277 | 278 |
| 278 } // namespace views | 279 } // namespace views |
| OLD | NEW |