#ifndef MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_
#define MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/threading/simple_thread.h"
#include "mojo/shell/dynamic_service_runner.h"
namespace mojo {
namespace shell {
class InProcessDynamicServiceRunner
: public DynamicServiceRunner,
public base::DelegateSimpleThread::Delegate {
public:
explicit InProcessDynamicServiceRunner(Context* context);
virtual ~InProcessDynamicServiceRunner();
virtual void Start(const base::FilePath& app_path,
ScopedShellHandle service_handle,
const base::Closure& app_completed_callback) OVERRIDE;
private:
virtual void Run() OVERRIDE;
base::FilePath app_path_;
ScopedShellHandle service_handle_;
base::Callback<bool(void)> app_completed_callback_runner_;
base::DelegateSimpleThread thread_;
DISALLOW_COPY_AND_ASSIGN(InProcessDynamicServiceRunner);
};
typedef DynamicServiceRunnerFactoryImpl<InProcessDynamicServiceRunner>
InProcessDynamicServiceRunnerFactory;
}
}
#endif