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

Side by Side Diff: services/shell/background/background_shell.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/catalog/catalog.cc ('k') | services/shell/background/background_shell.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 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 #ifndef SERVICES_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ 5 #ifndef SERVICES_SHELL_BACKGROUND_BACKGROUND_SHELL_H_
6 #define SERVICES_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ 6 #define SERVICES_SHELL_BACKGROUND_BACKGROUND_SHELL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file_path.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "mojo/public/cpp/bindings/interface_request.h" 13 #include "mojo/public/cpp/bindings/interface_request.h"
13 #include "services/catalog/store.h" 14 #include "services/catalog/store.h"
14 #include "services/shell/public/interfaces/service.mojom.h" 15 #include "services/shell/public/interfaces/service.mojom.h"
15 16
16 namespace catalog { 17 namespace catalog {
17 class Store; 18 class Store;
18 } 19 }
19 20
20 namespace shell { 21 namespace shell {
21 22
22 class NativeRunnerDelegate; 23 class NativeRunnerDelegate;
23 class ServiceManager; 24 class ServiceManager;
24 25
25 // BackgroundShell starts up the mojo shell on a background thread, and 26 // BackgroundShell starts up the mojo shell on a background thread, and
26 // destroys the thread in the destructor. Once created use CreateApplication() 27 // destroys the thread in the destructor. Once created use CreateApplication()
27 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can 28 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can
28 // then be bound to an ApplicationImpl. 29 // then be bound to an ApplicationImpl.
29 class BackgroundShell { 30 class BackgroundShell {
30 public: 31 public:
31 struct InitParams { 32 struct InitParams {
32 InitParams(); 33 InitParams();
33 ~InitParams(); 34 ~InitParams();
34 35
35 NativeRunnerDelegate* native_runner_delegate = nullptr; 36 NativeRunnerDelegate* native_runner_delegate = nullptr;
37 base::FilePath::StringType override_resource_path;
36 std::unique_ptr<catalog::Store> catalog_store; 38 std::unique_ptr<catalog::Store> catalog_store;
37 // If true the edk is initialized. 39 // If true the edk is initialized.
38 bool init_edk = true; 40 bool init_edk = true;
39 }; 41 };
40 42
41 BackgroundShell(); 43 BackgroundShell();
42 ~BackgroundShell(); 44 ~BackgroundShell();
43 45
44 // Starts the background shell. |command_line_switches| are additional 46 // Starts the background shell. |command_line_switches| are additional
45 // switches applied to any processes spawned by this call. 47 // switches applied to any processes spawned by this call.
(...skipping 14 matching lines...) Expand all
60 class MojoThread; 62 class MojoThread;
61 63
62 std::unique_ptr<MojoThread> thread_; 64 std::unique_ptr<MojoThread> thread_;
63 65
64 DISALLOW_COPY_AND_ASSIGN(BackgroundShell); 66 DISALLOW_COPY_AND_ASSIGN(BackgroundShell);
65 }; 67 };
66 68
67 } // namespace shell 69 } // namespace shell
68 70
69 #endif // SERVICES_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ 71 #endif // SERVICES_SHELL_BACKGROUND_BACKGROUND_SHELL_H_
OLDNEW
« no previous file with comments | « services/catalog/catalog.cc ('k') | services/shell/background/background_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698