Chromium Code Reviews| 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_ |