OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 5 #ifndef CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_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 "content/public/common/mojo_shell_connection.h" | 12 #include "content/public/common/mojo_shell_connection.h" |
13 #include "mojo/public/cpp/system/message_pipe.h" | 13 #include "mojo/public/cpp/system/message_pipe.h" |
14 #include "mojo/shell/public/cpp/application_impl.h" | |
15 #include "mojo/shell/public/cpp/shell_client.h" | 14 #include "mojo/shell/public/cpp/shell_client.h" |
| 15 #include "mojo/shell/public/cpp/shell_connection.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace shell { | 18 namespace shell { |
19 class RunnerConnection; | 19 class RunnerConnection; |
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 // Returns true for processes launched from an external mojo shell. | 25 // Returns true for processes launched from an external mojo shell. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void AddListener(Listener* listener) override; | 60 void AddListener(Listener* listener) override; |
61 void RemoveListener(Listener* listener) override; | 61 void RemoveListener(Listener* listener) override; |
62 | 62 |
63 // Blocks the calling thread until a connection to the spawning shell is | 63 // Blocks the calling thread until a connection to the spawning shell is |
64 // established, an Application request from it is bound, and the Initialize() | 64 // established, an Application request from it is bound, and the Initialize() |
65 // method on that application is called. | 65 // method on that application is called. |
66 void WaitForShell(mojo::ScopedMessagePipeHandle handle); | 66 void WaitForShell(mojo::ScopedMessagePipeHandle handle); |
67 | 67 |
68 bool initialized_; | 68 bool initialized_; |
69 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_; | 69 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_; |
70 scoped_ptr<mojo::ApplicationImpl> application_impl_; | 70 scoped_ptr<mojo::ShellConnection> shell_connection_; |
71 std::vector<Listener*> listeners_; | 71 std::vector<Listener*> listeners_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); | 73 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace content | 76 } // namespace content |
77 | 77 |
78 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 78 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
OLD | NEW |