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..3c208c87b40a3bbc3c73f2512be9c41a938ca58d 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,15 @@ 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 DSO's exported function MojoMain(). |
+ // The NativeLibrary is returned and ownership transferred to the caller. |
+ // This is so if it is unloaded at all, this can be done safely after this |
+ // thread is destroyed and any thread-local destructors have been executed. |
+ static base::NativeLibrary LoadAndRunService( |
+ const base::FilePath& app_path, |
+ ScopedMessagePipeHandle service_handle); |
}; |
class DynamicServiceRunnerFactory { |