OLD | NEW |
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 MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ | 5 #ifndef MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ |
6 #define MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ | 6 #define MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "mojo/public/cpp/bindings/interface_request.h" | 12 #include "mojo/public/cpp/bindings/interface_request.h" |
13 #include "mojo/services/package_manager/package_manager.h" | 13 #include "mojo/services/package_manager/package_manager.h" |
14 #include "mojo/shell/public/interfaces/shell_client.mojom.h" | 14 #include "mojo/shell/public/interfaces/shell_client.mojom.h" |
15 | 15 |
16 class GURL; | |
17 | |
18 namespace package_manager { | 16 namespace package_manager { |
19 class ApplicationCatalogStore; | 17 class ApplicationCatalogStore; |
20 } | 18 } |
21 | 19 |
22 namespace mojo { | 20 namespace mojo { |
23 namespace shell { | 21 namespace shell { |
24 | 22 |
25 class NativeRunnerDelegate; | 23 class NativeRunnerDelegate; |
26 | 24 |
27 // BackgroundShell starts up the mojo shell on a background thread, and | 25 // BackgroundShell starts up the mojo shell on a background thread, and |
(...skipping 10 matching lines...) Expand all Loading... |
38 scoped_ptr<package_manager::ApplicationCatalogStore> app_catalog; | 36 scoped_ptr<package_manager::ApplicationCatalogStore> app_catalog; |
39 }; | 37 }; |
40 | 38 |
41 BackgroundShell(); | 39 BackgroundShell(); |
42 ~BackgroundShell(); | 40 ~BackgroundShell(); |
43 | 41 |
44 // Starts the background shell. |command_line_switches| are additional | 42 // Starts the background shell. |command_line_switches| are additional |
45 // switches applied to any processes spawned by this call. | 43 // switches applied to any processes spawned by this call. |
46 void Init(scoped_ptr<InitParams> init_params); | 44 void Init(scoped_ptr<InitParams> init_params); |
47 | 45 |
48 // Obtains an InterfaceRequest for the specified url. | 46 // Obtains an InterfaceRequest for the specified name. |
49 InterfaceRequest<mojom::ShellClient> CreateShellClientRequest( | 47 mojom::ShellClientRequest CreateShellClientRequest( |
50 const GURL& url); | 48 const std::string& name); |
51 | 49 |
52 private: | 50 private: |
53 class MojoThread; | 51 class MojoThread; |
54 | 52 |
55 scoped_ptr<MojoThread> thread_; | 53 scoped_ptr<MojoThread> thread_; |
56 | 54 |
57 DISALLOW_COPY_AND_ASSIGN(BackgroundShell); | 55 DISALLOW_COPY_AND_ASSIGN(BackgroundShell); |
58 }; | 56 }; |
59 | 57 |
60 } // namespace shell | 58 } // namespace shell |
61 } // namespace mojo | 59 } // namespace mojo |
62 | 60 |
63 #endif // MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ | 61 #endif // MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_ |
OLD | NEW |