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

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

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 10 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
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 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
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
OLDNEW
« ui/aura/mus/window_tree_client.cc ('K') | « ui/views/mus/desktop_window_tree_host_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698