OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_ | |
6 #define CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "content/common/content_export.h" | |
11 | |
12 namespace shell { | |
13 class Connector; | |
14 } | |
15 | |
16 namespace content { | |
17 | |
18 // MojoShellContext manages the browser's connection to the ServiceManager, | |
19 // hosting a new in-process ServiceManager if the browser was not launched from | |
20 // an external one. | |
21 class CONTENT_EXPORT MojoShellContext { | |
22 public: | |
23 MojoShellContext(); | |
24 ~MojoShellContext(); | |
25 | |
26 // Returns a shell::Connector that can be used on the IO thread. | |
27 static shell::Connector* GetConnectorForIOThread(); | |
28 | |
29 private: | |
30 class InProcessServiceManagerContext; | |
31 | |
32 scoped_refptr<InProcessServiceManagerContext> in_process_context_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(MojoShellContext); | |
35 }; | |
36 | |
37 } // namespace content | |
38 | |
39 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_ | |
OLD | NEW |