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

Side by Side Diff: mojo/shell/background/background_shell.cc

Issue 1775243002: Rename PackageManager->Catalog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@42cpi
Patch Set: . Created 4 years, 9 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 | « mojo/shell/background/background_shell.h ('k') | mojo/shell/background/tests/BUILD.gn » ('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 "mojo/shell/background/background_shell.h" 5 #include "mojo/shell/background/background_shell.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "base/threading/simple_thread.h" 13 #include "base/threading/simple_thread.h"
14 #include "mojo/message_pump/message_pump_mojo.h" 14 #include "mojo/message_pump/message_pump_mojo.h"
15 #include "mojo/services/package_manager/package_manager.h" 15 #include "mojo/services/catalog/catalog.h"
16 #include "mojo/shell/connect_params.h" 16 #include "mojo/shell/connect_params.h"
17 #include "mojo/shell/loader.h" 17 #include "mojo/shell/loader.h"
18 #include "mojo/shell/public/cpp/shell_client.h" 18 #include "mojo/shell/public/cpp/shell_client.h"
19 #include "mojo/shell/public/cpp/shell_connection.h" 19 #include "mojo/shell/public/cpp/shell_connection.h"
20 #include "mojo/shell/shell.h" 20 #include "mojo/shell/shell.h"
21 #include "mojo/shell/standalone/context.h" 21 #include "mojo/shell/standalone/context.h"
22 22
23 namespace mojo { 23 namespace mojo {
24 namespace shell { 24 namespace shell {
25 namespace { 25 namespace {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 Context::EnsureEmbedderIsInitialized(); 116 Context::EnsureEmbedderIsInitialized();
117 117
118 message_loop_->BindToCurrentThread(); 118 message_loop_->BindToCurrentThread();
119 119
120 scoped_ptr<Context> context(new Context); 120 scoped_ptr<Context> context(new Context);
121 context_ = context.get(); 121 context_ = context.get();
122 scoped_ptr<mojo::shell::Context::InitParams> context_init_params( 122 scoped_ptr<mojo::shell::Context::InitParams> context_init_params(
123 new mojo::shell::Context::InitParams); 123 new mojo::shell::Context::InitParams);
124 if (init_params_) { 124 if (init_params_) {
125 context_init_params->app_catalog = std::move(init_params_->app_catalog); 125 context_init_params->catalog_store =
126 std::move(init_params_->catalog_store);
126 context_init_params->native_runner_delegate = 127 context_init_params->native_runner_delegate =
127 init_params_->native_runner_delegate; 128 init_params_->native_runner_delegate;
128 } 129 }
129 context_->Init(std::move(context_init_params)); 130 context_->Init(std::move(context_init_params));
130 131
131 message_loop_->Run(); 132 message_loop_->Run();
132 133
133 // Has to happen after run, but while messageloop still valid. 134 // Has to happen after run, but while messageloop still valid.
134 context_->Shutdown(); 135 context_->Shutdown();
135 136
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 thread_->message_loop()->task_runner()->PostTask( 186 thread_->message_loop()->task_runner()->PostTask(
186 FROM_HERE, base::Bind(&MojoThread::CreateShellClientRequest, 187 FROM_HERE, base::Bind(&MojoThread::CreateShellClientRequest,
187 base::Unretained(thread_.get()), &signal, 188 base::Unretained(thread_.get()), &signal,
188 base::Passed(&params), &request)); 189 base::Passed(&params), &request));
189 signal.Wait(); 190 signal.Wait();
190 return request; 191 return request;
191 } 192 }
192 193
193 } // namespace shell 194 } // namespace shell
194 } // namespace mojo 195 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/background/background_shell.h ('k') | mojo/shell/background/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698