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

Side by Side Diff: mojo/shell/in_process_dynamic_service_runner.h

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « mojo/shell/filename_util.cc ('k') | mojo/shell/in_process_dynamic_service_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_
6 #define MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_
7
8 #include "base/callback.h"
9 #include "base/files/file_path.h"
10 #include "base/macros.h"
11 #include "base/scoped_native_library.h"
12 #include "base/threading/simple_thread.h"
13 #include "mojo/shell/dynamic_service_runner.h"
14
15 namespace mojo {
16 namespace shell {
17
18 // An implementation of |DynamicServiceRunner| that loads/runs the given app
19 // (from the file system) on a separate thread (in the current process).
20 class InProcessDynamicServiceRunner
21 : public DynamicServiceRunner,
22 public base::DelegateSimpleThread::Delegate {
23 public:
24 explicit InProcessDynamicServiceRunner(Context* context);
25 ~InProcessDynamicServiceRunner() override;
26
27 // |DynamicServiceRunner| method:
28 void Start(const base::FilePath& app_path,
29 ScopedMessagePipeHandle service_handle,
30 const base::Closure& app_completed_callback) override;
31
32 private:
33 // |base::DelegateSimpleThread::Delegate| method:
34 void Run() override;
35
36 base::FilePath app_path_;
37 ScopedMessagePipeHandle service_handle_;
38 base::Callback<bool(void)> app_completed_callback_runner_;
39
40 base::ScopedNativeLibrary app_library_;
41 scoped_ptr<base::DelegateSimpleThread> thread_;
42
43 DISALLOW_COPY_AND_ASSIGN(InProcessDynamicServiceRunner);
44 };
45
46 typedef DynamicServiceRunnerFactoryImpl<InProcessDynamicServiceRunner>
47 InProcessDynamicServiceRunnerFactory;
48
49 } // namespace shell
50 } // namespace mojo
51
52 #endif // MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_
OLDNEW
« no previous file with comments | « mojo/shell/filename_util.cc ('k') | mojo/shell/in_process_dynamic_service_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698