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

Side by Side Diff: content/utility/utility_service_factory.cc

Issue 2398783002: Rename a bunch of Mojo Application stuff to reference Services. (Closed)
Patch Set: . Created 4 years, 2 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 | « content/shell/utility/shell_content_utility_client.cc ('k') | services/file/user_id_map.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/utility/utility_service_factory.h" 5 #include "content/utility/utility_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/public/common/content_client.h" 8 #include "content/public/common/content_client.h"
9 #include "content/public/utility/content_utility_client.h" 9 #include "content/public/utility/content_utility_client.h"
10 #include "content/public/utility/utility_thread.h" 10 #include "content/public/utility/utility_thread.h"
11 #include "content/utility/utility_thread_impl.h" 11 #include "content/utility/utility_thread_impl.h"
12 12
13 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) 13 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
14 #include "media/mojo/services/mojo_media_application_factory.h" // nogncheck 14 #include "media/mojo/services/mojo_media_application_factory.h" // nogncheck
15 #endif 15 #endif
16 16
17 namespace content { 17 namespace content {
18 18
19 UtilityServiceFactory::UtilityServiceFactory() {} 19 UtilityServiceFactory::UtilityServiceFactory() {}
20 20
21 UtilityServiceFactory::~UtilityServiceFactory() {} 21 UtilityServiceFactory::~UtilityServiceFactory() {}
22 22
23 void UtilityServiceFactory::RegisterServices(ServiceMap* services) { 23 void UtilityServiceFactory::RegisterServices(ServiceMap* services) {
24 GetContentClient()->utility()->RegisterMojoApplications(services); 24 GetContentClient()->utility()->RegisterServices(services);
25 25
26 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) 26 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
27 MojoApplicationInfo service_info; 27 ServiceInfo info;
28 service_info.application_factory = 28 info.factory = base::Bind(&media::CreateMojoMediaApplication);
29 base::Bind(&media::CreateMojoMediaApplication); 29 services->insert(std::make_pair("service:media", info));
30 services->insert(std::make_pair("service:media", service_info));
31 #endif 30 #endif
32 } 31 }
33 32
34 void UtilityServiceFactory::OnServiceQuit() { 33 void UtilityServiceFactory::OnServiceQuit() {
35 UtilityThread::Get()->ReleaseProcessIfNeeded(); 34 UtilityThread::Get()->ReleaseProcessIfNeeded();
36 } 35 }
37 36
38 void UtilityServiceFactory::OnLoadFailed() { 37 void UtilityServiceFactory::OnLoadFailed() {
39 UtilityThreadImpl* utility_thread = 38 UtilityThreadImpl* utility_thread =
40 static_cast<UtilityThreadImpl*>(UtilityThread::Get()); 39 static_cast<UtilityThreadImpl*>(UtilityThread::Get());
41 utility_thread->Shutdown(); 40 utility_thread->Shutdown();
42 utility_thread->ReleaseProcessIfNeeded(); 41 utility_thread->ReleaseProcessIfNeeded();
43 } 42 }
44 43
45 } // namespace content 44 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/utility/shell_content_utility_client.cc ('k') | services/file/user_id_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698