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

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

Issue 2377203005: services/shell: Allow injecting the location of resources.
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 | « services/shell/background/background_shell.cc ('k') | services/shell/standalone/context.cc » ('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 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_SHELL_STANDALONE_CONTEXT_H_ 5 #ifndef SERVICES_SHELL_STANDALONE_CONTEXT_H_
6 #define SERVICES_SHELL_STANDALONE_CONTEXT_H_ 6 #define SERVICES_SHELL_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/files/file_path.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
14 #include "base/time/time.h" 15 #include "base/time/time.h"
15 #include "mojo/edk/embedder/process_delegate.h" 16 #include "mojo/edk/embedder/process_delegate.h"
16 #include "services/shell/service_manager.h" 17 #include "services/shell/service_manager.h"
17 #include "services/shell/standalone/tracer.h" 18 #include "services/shell/standalone/tracer.h"
18 19
19 namespace base { 20 namespace base {
20 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
21 } 22 }
22 23
23 namespace catalog { 24 namespace catalog {
24 class Catalog; 25 class Catalog;
25 class Store; 26 class Store;
26 } 27 }
27 28
28 namespace shell { 29 namespace shell {
29 class NativeRunnerDelegate; 30 class NativeRunnerDelegate;
30 31
31 // The "global" context for the shell's main process. 32 // The "global" context for the shell's main process.
32 class Context : public mojo::edk::ProcessDelegate { 33 class Context : public mojo::edk::ProcessDelegate {
33 public: 34 public:
34 struct InitParams { 35 struct InitParams {
35 InitParams(); 36 InitParams();
36 ~InitParams(); 37 ~InitParams();
37 38
38 NativeRunnerDelegate* native_runner_delegate = nullptr; 39 NativeRunnerDelegate* native_runner_delegate = nullptr;
39 std::unique_ptr<catalog::Store> catalog_store; 40 std::unique_ptr<catalog::Store> catalog_store;
41 base::FilePath::StringType override_resource_path;
40 // If true the edk is initialized. 42 // If true the edk is initialized.
41 bool init_edk = true; 43 bool init_edk = true;
42 }; 44 };
43 45
44 Context(); 46 Context();
45 ~Context() override; 47 ~Context() override;
46 48
47 static void EnsureEmbedderIsInitialized(); 49 static void EnsureEmbedderIsInitialized();
48 50
49 // This must be called with a message loop set up for the current thread, 51 // This must be called with a message loop set up for the current thread,
(...skipping 26 matching lines...) Expand all
76 std::unique_ptr<ServiceManager> service_manager_; 78 std::unique_ptr<ServiceManager> service_manager_;
77 base::Time main_entry_time_; 79 base::Time main_entry_time_;
78 bool init_edk_ = false; 80 bool init_edk_ = false;
79 81
80 DISALLOW_COPY_AND_ASSIGN(Context); 82 DISALLOW_COPY_AND_ASSIGN(Context);
81 }; 83 };
82 84
83 } // namespace shell 85 } // namespace shell
84 86
85 #endif // SERVICES_SHELL_STANDALONE_CONTEXT_H_ 87 #endif // SERVICES_SHELL_STANDALONE_CONTEXT_H_
OLDNEW
« no previous file with comments | « services/shell/background/background_shell.cc ('k') | services/shell/standalone/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698