Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: shell/nacl/nacl_service_runner.h

Issue 884303002: Launch nexes from mojo_shell. Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Whitepace Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..4ff199bc6695845e94422b012af08ef60b604c5b
--- /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 {
jamesr 2015/01/28 23:11:30 why isn't this a DynamicServiceRunner?
Nick Bray (chromium) 2015/01/29 22:31:35 Because DynamicServiceRunner has assumptions about
+ public:
+ NaClServiceRunner(Context* context);
jamesr 2015/01/28 23:11:30 explicit
Nick Bray (chromium) 2015/01/29 22:31:35 Done.
+ virtual ~NaClServiceRunner();
+
+ // 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_

Powered by Google App Engine
This is Rietveld 408576698