OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTERNAL_APPLICATION_LISTENER_H_ | 5 #ifndef SHELL_EXTERNAL_APPLICATION_LISTENER_H_ |
6 #define MOJO_SHELL_EXTERNAL_APPLICATION_LISTENER_H_ | 6 #define SHELL_EXTERNAL_APPLICATION_LISTENER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.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/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
13 #include "mojo/public/cpp/system/message_pipe.h" | 13 #include "mojo/public/cpp/system/message_pipe.h" |
14 #include "mojo/shell/domain_socket/socket_descriptor.h" | 14 #include "shell/domain_socket/socket_descriptor.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace shell { | 18 namespace shell { |
19 | 19 |
20 // In order to support Mojo apps whose lifetime is managed by | 20 // In order to support Mojo apps whose lifetime is managed by |
21 // something other than mojo_shell, mojo_shell needs to support a | 21 // something other than mojo_shell, mojo_shell needs to support a |
22 // mechanism by which such an application can discover a running shell | 22 // mechanism by which such an application can discover a running shell |
23 // instance, connect to it, and ask to be "registered" at a given | 23 // instance, connect to it, and ask to be "registered" at a given |
24 // URL. Registration implies that the app can be connected to at that | 24 // URL. Registration implies that the app can be connected to at that |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const ErrorCallback& error_callback) = 0; | 61 const ErrorCallback& error_callback) = 0; |
62 | 62 |
63 // Block the current thread until listening has started on io_runner. | 63 // Block the current thread until listening has started on io_runner. |
64 // If listening has already started, returns immediately. | 64 // If listening has already started, returns immediately. |
65 virtual void WaitForListening() = 0; | 65 virtual void WaitForListening() = 0; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace shell | 68 } // namespace shell |
69 } // namespace mojo | 69 } // namespace mojo |
70 | 70 |
71 #endif // MOJO_SHELL_EXTERNAL_APPLICATION_LISTENER_H_ | 71 #endif // SHELL_EXTERNAL_APPLICATION_LISTENER_H_ |
OLD | NEW |