Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: ui/views/mus/mus_client.cc

Issue 2596903002: discardable shared memory: Allow resetting the allocator instance. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/memory/discardable_memory_allocator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « base/memory/discardable_memory_allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698