Chromium Code Reviews| Index: mojo/shell/dynamic_service_runner.h |
| diff --git a/mojo/shell/dynamic_service_runner.h b/mojo/shell/dynamic_service_runner.h |
| index aa392f853097a47283e97f9b7dd43cc9274f6420..a9412638a2607ec3749a5d18f87e89306e5db604 100644 |
| --- a/mojo/shell/dynamic_service_runner.h |
| +++ b/mojo/shell/dynamic_service_runner.h |
| @@ -7,6 +7,7 @@ |
| #include "base/callback_forward.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/native_library.h" |
| #include "mojo/public/cpp/system/core.h" |
| namespace base { |
| @@ -30,6 +31,18 @@ class DynamicServiceRunner { |
| virtual void Start(const base::FilePath& app_path, |
| ScopedMessagePipeHandle service_handle, |
| const base::Closure& app_completed_callback) = 0; |
| + |
| + // Loads the service in the DSO specificed by |app_path| and prepares it for |
| + // execution. Runs the exported function MojoMain() and blocks until it |
|
viettrungluu
2014/10/29 23:11:43
Just say "Runs the DSO's exported MojoMain() on th
DaveMoore
2014/10/30 15:32:56
Done.
|
| + // returns. |
| + // The NativeLibrary is returned and ownership transfered to the caller. |
|
viettrungluu
2014/10/29 23:11:43
"transfered" -> "transferred"
DaveMoore
2014/10/30 15:32:56
Done.
|
| + // This is primarilly so if it is to be unloaded through |
|
viettrungluu
2014/10/29 23:11:43
"primarilly" -> "primarily"
Maybe just say:
This
DaveMoore
2014/10/30 15:32:56
Done.
|
| + // base::UnloadNativeLibrary it can be done so safely after the thread that |
| + // the library was loaded on has been destroyed, after safely executing any |
| + // thread local destructors. |
| + static base::NativeLibrary LoadAndRunService( |
| + const base::FilePath& app_path, |
| + ScopedMessagePipeHandle service_handle); |
| }; |
| class DynamicServiceRunnerFactory { |