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 catalog { | 22 namespace catalog { |
23 class Owner; | 23 class Factory; |
24 class Store; | 24 class Store; |
25 } | 25 } |
26 | 26 |
27 namespace mojo { | 27 namespace mojo { |
28 namespace shell { | 28 namespace shell { |
29 class NativeRunnerDelegate; | 29 class NativeRunnerDelegate; |
30 | 30 |
31 // The "global" context for the shell's main process. | 31 // The "global" context for the shell's main process. |
32 class Context : public edk::ProcessDelegate { | 32 class Context : public edk::ProcessDelegate { |
33 public: | 33 public: |
(...skipping 29 matching lines...) Expand all Loading... |
63 // Runs the app specified by |name|. | 63 // Runs the app specified by |name|. |
64 void Run(const std::string& name); | 64 void Run(const std::string& name); |
65 | 65 |
66 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_; | 66 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_; |
67 scoped_ptr<base::Thread> io_thread_; | 67 scoped_ptr<base::Thread> io_thread_; |
68 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 68 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
69 | 69 |
70 // Ensure this is destructed before task_runners_ since it owns a message pipe | 70 // Ensure this is destructed before task_runners_ since it owns a message pipe |
71 // that needs the IO thread to destruct cleanly. | 71 // that needs the IO thread to destruct cleanly. |
72 Tracer tracer_; | 72 Tracer tracer_; |
73 scoped_ptr<catalog::Owner> catalog_; | 73 scoped_ptr<catalog::Factory> catalog_; |
74 scoped_ptr<Shell> shell_; | 74 scoped_ptr<Shell> shell_; |
75 base::Time main_entry_time_; | 75 base::Time main_entry_time_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(Context); | 77 DISALLOW_COPY_AND_ASSIGN(Context); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace shell | 80 } // namespace shell |
81 } // namespace mojo | 81 } // namespace mojo |
82 | 82 |
83 #endif // MOJO_SHELL_STANDALONE_CONTEXT_H_ | 83 #endif // MOJO_SHELL_STANDALONE_CONTEXT_H_ |
OLD | NEW |