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

Side by Side Diff: services/service_manager/standalone/context.h

Issue 2573283002: Use a static catalog manifest for the standalone Mash runner (Closed)
Patch Set: . Created 3 years, 12 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef SERVICES_SERVICE_MANAGER_STANDALONE_CONTEXT_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_STANDALONE_CONTEXT_H_
6 #define SERVICES_SERVICE_MANAGER_STANDALONE_CONTEXT_H_ 6 #define SERVICES_SERVICE_MANAGER_STANDALONE_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h"
15 #include "mojo/edk/embedder/process_delegate.h" 16 #include "mojo/edk/embedder/process_delegate.h"
17 #include "services/service_manager/runner/host/service_process_launcher.h"
16 #include "services/service_manager/service_manager.h" 18 #include "services/service_manager/service_manager.h"
17 #include "services/service_manager/standalone/tracer.h" 19 #include "services/service_manager/standalone/tracer.h"
18 #include "services/tracing/public/cpp/provider.h" 20 #include "services/tracing/public/cpp/provider.h"
19 21
20 namespace base { 22 namespace base {
21 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
22 } 24 }
23 25
24 namespace catalog { 26 namespace catalog {
25 class Catalog; 27 class Catalog;
26 class Store;
27 } 28 }
28 29
29 namespace service_manager { 30 namespace service_manager {
30 31
31 constexpr size_t kThreadPoolMaxThreads = 3; 32 constexpr size_t kThreadPoolMaxThreads = 3;
32 33
33 // The "global" context for the service manager's main process. 34 // The "global" context for the service manager's main process.
34 class Context : public mojo::edk::ProcessDelegate { 35 class Context : public mojo::edk::ProcessDelegate {
35 public: 36 public:
36 struct InitParams { 37 struct InitParams {
37 InitParams(); 38 InitParams();
38 ~InitParams(); 39 ~InitParams();
39 40
40 ServiceProcessLauncher::Delegate* 41 ServiceProcessLauncher::Delegate*
41 service_process_launcher_delegate = nullptr; 42 service_process_launcher_delegate = nullptr;
42 std::unique_ptr<catalog::Store> catalog_store; 43 std::unique_ptr<base::Value> static_catalog;
43 // If true the edk is initialized. 44 // If true the edk is initialized.
44 bool init_edk = true; 45 bool init_edk = true;
45 }; 46 };
46 47
47 Context(); 48 Context();
48 ~Context() override; 49 ~Context() override;
49 50
50 static void EnsureEmbedderIsInitialized(); 51 static void EnsureEmbedderIsInitialized();
51 52
52 // This must be called with a message loop set up for the current thread, 53 // This must be called with a message loop set up for the current thread,
(...skipping 27 matching lines...) Expand all
80 std::unique_ptr<ServiceManager> service_manager_; 81 std::unique_ptr<ServiceManager> service_manager_;
81 base::Time main_entry_time_; 82 base::Time main_entry_time_;
82 bool init_edk_ = false; 83 bool init_edk_ = false;
83 84
84 DISALLOW_COPY_AND_ASSIGN(Context); 85 DISALLOW_COPY_AND_ASSIGN(Context);
85 }; 86 };
86 87
87 } // namespace service_manager 88 } // namespace service_manager
88 89
89 #endif // SERVICES_SERVICE_MANAGER_STANDALONE_CONTEXT_H_ 90 #endif // SERVICES_SERVICE_MANAGER_STANDALONE_CONTEXT_H_
OLDNEW
« no previous file with comments | « services/service_manager/standalone/BUILD.gn ('k') | services/service_manager/standalone/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698