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

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

Issue 1320453003: media: Support MojoMediaApplication in GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing import Created 5 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/gpu/gpu_process_control_impl.cc ('k') | media/media_options.gni » ('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_process_control_impl.h" 5 #include "content/utility/utility_process_control_impl.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"
(...skipping 25 matching lines...) Expand all
36 36
37 ContentUtilityClient::StaticMojoApplicationMap apps; 37 ContentUtilityClient::StaticMojoApplicationMap apps;
38 GetContentClient()->utility()->RegisterMojoApplications(&apps); 38 GetContentClient()->utility()->RegisterMojoApplications(&apps);
39 39
40 for (const auto& entry : apps) { 40 for (const auto& entry : apps) {
41 map_ref[entry.first] = new mojo::shell::StaticApplicationLoader( 41 map_ref[entry.first] = new mojo::shell::StaticApplicationLoader(
42 entry.second, base::Bind(&QuitProcess)); 42 entry.second, base::Bind(&QuitProcess));
43 } 43 }
44 44
45 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) 45 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
46 map_ref[media::MojoMediaApplication::AppUrl()] = 46 map_ref[GURL("mojo:media")] = new mojo::shell::StaticApplicationLoader(
47 new mojo::shell::StaticApplicationLoader( 47 base::Bind(&media::MojoMediaApplication::CreateApp),
48 base::Bind(&media::MojoMediaApplication::CreateApp), 48 base::Bind(&QuitProcess));
49 base::Bind(&QuitProcess));
50 #endif 49 #endif
51 } 50 }
52 51
53 void UtilityProcessControlImpl::OnLoadFailed() { 52 void UtilityProcessControlImpl::OnLoadFailed() {
54 UtilityThreadImpl* utility_thread = 53 UtilityThreadImpl* utility_thread =
55 static_cast<UtilityThreadImpl*>(UtilityThread::Get()); 54 static_cast<UtilityThreadImpl*>(UtilityThread::Get());
56 utility_thread->Shutdown(); 55 utility_thread->Shutdown();
57 utility_thread->ReleaseProcessIfNeeded(); 56 utility_thread->ReleaseProcessIfNeeded();
58 } 57 }
59 58
60 } // namespace content 59 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_process_control_impl.cc ('k') | media/media_options.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698