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

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

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 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 | « ui/views/mus/clipboard_mus.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 io_task_runner = io_thread_->task_runner(); 75 io_task_runner = io_thread_->task_runner();
76 } 76 }
77 77
78 // TODO(msw): Avoid this... use some default value? Allow clients to extend? 78 // TODO(msw): Avoid this... use some default value? Allow clients to extend?
79 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); 79 property_converter_ = base::MakeUnique<aura::PropertyConverter>();
80 80
81 if (create_wm_state) 81 if (create_wm_state)
82 wm_state_ = base::MakeUnique<wm::WMState>(); 82 wm_state_ = base::MakeUnique<wm::WMState>();
83 83
84 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; 84 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr;
85 connector->ConnectToInterface(ui::mojom::kServiceName, &manager_ptr); 85 connector->BindInterface(ui::mojom::kServiceName, &manager_ptr);
86 86
87 discardable_shared_memory_manager_ = base::MakeUnique< 87 discardable_shared_memory_manager_ = base::MakeUnique<
88 discardable_memory::ClientDiscardableSharedMemoryManager>( 88 discardable_memory::ClientDiscardableSharedMemoryManager>(
89 std::move(manager_ptr), io_task_runner); 89 std::move(manager_ptr), io_task_runner);
90 base::DiscardableMemoryAllocator::SetInstance( 90 base::DiscardableMemoryAllocator::SetInstance(
91 discardable_shared_memory_manager_.get()); 91 discardable_shared_memory_manager_.get());
92 92
93 gpu_ = ui::Gpu::Create(connector, std::move(io_task_runner)); 93 gpu_ = ui::Gpu::Create(connector, std::move(io_task_runner));
94 compositor_context_factory_ = 94 compositor_context_factory_ =
95 base::MakeUnique<aura::MusContextFactory>(gpu_.get()); 95 base::MakeUnique<aura::MusContextFactory>(gpu_.get());
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return root->GetTopWindowContainingPoint(relative_point); 278 return root->GetTopWindowContainingPoint(relative_point);
279 } 279 }
280 return nullptr; 280 return nullptr;
281 } 281 }
282 282
283 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { 283 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() {
284 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 284 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
285 } 285 }
286 286
287 } // namespace views 287 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/clipboard_mus.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698