OLD | NEW |
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 MOJO_SHELL_STANDALONE_CONTEXT_H_ | 5 #ifndef MOJO_SHELL_STANDALONE_CONTEXT_H_ |
6 #define MOJO_SHELL_STANDALONE_CONTEXT_H_ | 6 #define MOJO_SHELL_STANDALONE_CONTEXT_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "mojo/edk/embedder/process_delegate.h" | 14 #include "mojo/edk/embedder/process_delegate.h" |
15 #include "mojo/shell/shell.h" | 15 #include "mojo/shell/shell.h" |
16 #include "mojo/shell/standalone/tracer.h" | 16 #include "mojo/shell/standalone/tracer.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
20 } | 20 } |
21 | 21 |
22 namespace package_manager { | 22 namespace catalog { |
23 class ApplicationCatalogStore; | 23 class Store; |
24 } | 24 } |
25 | 25 |
26 namespace mojo { | 26 namespace mojo { |
27 namespace shell { | 27 namespace shell { |
28 class NativeRunnerDelegate; | 28 class NativeRunnerDelegate; |
29 | 29 |
30 // The "global" context for the shell's main process. | 30 // The "global" context for the shell's main process. |
31 class Context : public edk::ProcessDelegate { | 31 class Context : public edk::ProcessDelegate { |
32 public: | 32 public: |
33 struct InitParams { | 33 struct InitParams { |
34 InitParams(); | 34 InitParams(); |
35 ~InitParams(); | 35 ~InitParams(); |
36 | 36 |
37 NativeRunnerDelegate* native_runner_delegate = nullptr; | 37 NativeRunnerDelegate* native_runner_delegate = nullptr; |
38 scoped_ptr<package_manager::ApplicationCatalogStore> app_catalog; | 38 scoped_ptr<catalog::Store> catalog_store; |
39 }; | 39 }; |
40 | 40 |
41 Context(); | 41 Context(); |
42 ~Context() override; | 42 ~Context() override; |
43 | 43 |
44 static void EnsureEmbedderIsInitialized(); | 44 static void EnsureEmbedderIsInitialized(); |
45 | 45 |
46 // This must be called with a message loop set up for the current thread, | 46 // This must be called with a message loop set up for the current thread, |
47 // which must remain alive until after Shutdown() is called. | 47 // which must remain alive until after Shutdown() is called. |
48 void Init(scoped_ptr<InitParams> init_params); | 48 void Init(scoped_ptr<InitParams> init_params); |
(...skipping 23 matching lines...) Expand all Loading... |
72 scoped_ptr<Shell> shell_; | 72 scoped_ptr<Shell> shell_; |
73 base::Time main_entry_time_; | 73 base::Time main_entry_time_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(Context); | 75 DISALLOW_COPY_AND_ASSIGN(Context); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace shell | 78 } // namespace shell |
79 } // namespace mojo | 79 } // namespace mojo |
80 | 80 |
81 #endif // MOJO_SHELL_STANDALONE_CONTEXT_H_ | 81 #endif // MOJO_SHELL_STANDALONE_CONTEXT_H_ |
OLD | NEW |