OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SHELL_NACL_NACL_SERVICE_RUNNER_H_ | |
6 #define SHELL_NACL_NACL_SERVICE_RUNNER_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/threading/simple_thread.h" | |
11 #include "mojo/public/cpp/bindings/interface_request.h" | |
12 | |
13 namespace mojo { | |
14 class Application; | |
15 | |
16 namespace shell { | |
17 | |
18 class Context; | |
19 | |
20 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
| |
21 public: | |
22 NaClServiceRunner(Context* context); | |
jamesr
2015/01/28 23:11:30
explicit
Nick Bray (chromium)
2015/01/29 22:31:35
Done.
| |
23 virtual ~NaClServiceRunner(); | |
24 | |
25 // Loads the app in the file at |app_path| and runs it on some other | |
26 // thread/process. | |
27 void Start(const base::FilePath& app_path, | |
28 InterfaceRequest<Application> application_request); | |
29 | |
30 private: | |
31 // |base::DelegateSimpleThread::Delegate| method: | |
32 void Run() override; | |
33 | |
34 Context* context_; | |
35 | |
36 base::FilePath irt_path_; | |
37 base::FilePath app_path_; | |
38 InterfaceRequest<Application> application_request_; | |
39 | |
40 scoped_ptr<base::DelegateSimpleThread> thread_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(NaClServiceRunner); | |
43 }; | |
44 | |
45 } // namespace shell | |
46 } // namespace mojo | |
47 | |
48 #endif // SHELL_NACL_NACL_SERVICE_RUNNER_H_ | |
OLD | NEW |