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

Side by Side Diff: services/ui/service.cc

Issue 2589253002: Remove discardable_memory::DSMM::{Create,Get}Instance() (Closed)
Patch Set: Fix trybot Created 4 years 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 | « services/ui/service.h ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/service.h" 5 #include "services/ui/service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 window_server_.reset(new ws::WindowServer(this)); 192 window_server_.reset(new ws::WindowServer(this));
193 193
194 // DeviceDataManager must be initialized before TouchController. On non-Linux 194 // DeviceDataManager must be initialized before TouchController. On non-Linux
195 // platforms there is no DeviceDataManager so don't create touch controller. 195 // platforms there is no DeviceDataManager so don't create touch controller.
196 if (ui::DeviceDataManager::HasInstance()) 196 if (ui::DeviceDataManager::HasInstance())
197 touch_controller_.reset( 197 touch_controller_.reset(
198 new ws::TouchController(window_server_->display_manager())); 198 new ws::TouchController(window_server_->display_manager()));
199 199
200 ime_server_.Init(context()->connector(), test_config_); 200 ime_server_.Init(context()->connector(), test_config_);
201 201
202 discardable_memory::DiscardableSharedMemoryManager::CreateInstance(); 202 discardable_shared_memory_manager_ =
203 base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>();
203 } 204 }
204 205
205 bool Service::OnConnect(const service_manager::ServiceInfo& remote_info, 206 bool Service::OnConnect(const service_manager::ServiceInfo& remote_info,
206 service_manager::InterfaceRegistry* registry) { 207 service_manager::InterfaceRegistry* registry) {
207 registry->AddInterface<mojom::AccessibilityManager>(this); 208 registry->AddInterface<mojom::AccessibilityManager>(this);
208 registry->AddInterface<mojom::Clipboard>(this); 209 registry->AddInterface<mojom::Clipboard>(this);
209 registry->AddInterface<mojom::DisplayManager>(this); 210 registry->AddInterface<mojom::DisplayManager>(this);
210 registry->AddInterface<mojom::Gpu>(this); 211 registry->AddInterface<mojom::Gpu>(this);
211 registry->AddInterface<mojom::IMERegistrar>(this); 212 registry->AddInterface<mojom::IMERegistrar>(this);
212 registry->AddInterface<mojom::IMEServer>(this); 213 registry->AddInterface<mojom::IMEServer>(this);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 if (!user_state->window_tree_host_factory) { 362 if (!user_state->window_tree_host_factory) {
362 user_state->window_tree_host_factory.reset(new ws::WindowTreeHostFactory( 363 user_state->window_tree_host_factory.reset(new ws::WindowTreeHostFactory(
363 window_server_.get(), remote_identity.user_id())); 364 window_server_.get(), remote_identity.user_id()));
364 } 365 }
365 user_state->window_tree_host_factory->AddBinding(std::move(request)); 366 user_state->window_tree_host_factory->AddBinding(std::move(request));
366 } 367 }
367 368
368 void Service::Create( 369 void Service::Create(
369 const service_manager::Identity& remote_identity, 370 const service_manager::Identity& remote_identity,
370 discardable_memory::mojom::DiscardableSharedMemoryManagerRequest request) { 371 discardable_memory::mojom::DiscardableSharedMemoryManagerRequest request) {
371 discardable_memory::DiscardableSharedMemoryManager::GetInstance()->Bind( 372 discardable_shared_memory_manager_->Bind(std::move(request));
372 std::move(request));
373 } 373 }
374 374
375 void Service::Create(const service_manager::Identity& remote_identity, 375 void Service::Create(const service_manager::Identity& remote_identity,
376 mojom::WindowServerTestRequest request) { 376 mojom::WindowServerTestRequest request) {
377 if (!test_config_) 377 if (!test_config_)
378 return; 378 return;
379 mojo::MakeStrongBinding( 379 mojo::MakeStrongBinding(
380 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), 380 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()),
381 std::move(request)); 381 std::move(request));
382 } 382 }
383 383
384 384
385 } // namespace ui 385 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698