Index: shell/nacl/nacl_service_runner.h |
diff --git a/shell/nacl/nacl_service_runner.h b/shell/nacl/nacl_service_runner.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b1fd6780c0d68a391f795377d943b02614417b3c |
--- /dev/null |
+++ b/shell/nacl/nacl_service_runner.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SHELL_NACL_NACL_SERVICE_RUNNER_H_ |
+#define SHELL_NACL_NACL_SERVICE_RUNNER_H_ |
+ |
+#include "base/files/file_path.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/threading/simple_thread.h" |
+#include "mojo/public/cpp/bindings/interface_request.h" |
+ |
+namespace mojo { |
+class Application; |
+ |
+namespace shell { |
+ |
+class Context; |
+ |
+class NaClServiceRunner : public base::DelegateSimpleThread::Delegate { |
+ public: |
+ explicit NaClServiceRunner(Context* context); |
+ ~NaClServiceRunner() override; |
+ |
+ // Loads the app in the file at |app_path| and runs it on some other |
+ // thread/process. |
+ void Start(const base::FilePath& app_path, |
+ InterfaceRequest<Application> application_request); |
+ |
+ private: |
+ // |base::DelegateSimpleThread::Delegate| method: |
+ void Run() override; |
+ |
+ Context* context_; |
+ |
+ base::FilePath irt_path_; |
+ base::FilePath app_path_; |
+ InterfaceRequest<Application> application_request_; |
+ |
+ scoped_ptr<base::DelegateSimpleThread> thread_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NaClServiceRunner); |
+}; |
+ |
+} // namespace shell |
+} // namespace mojo |
+ |
+#endif // SHELL_NACL_NACL_SERVICE_RUNNER_H_ |