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

Side by Side Diff: services/shell/native_runner.h

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « services/shell/loader.h ('k') | services/shell/native_runner_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_SHELL_NATIVE_RUNNER_H_ 5 #ifndef SERVICES_SHELL_NATIVE_RUNNER_H_
6 #define SERVICES_SHELL_NATIVE_RUNNER_H_ 6 #define SERVICES_SHELL_NATIVE_RUNNER_H_
7 7
8 #include <memory>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/process/process_handle.h" 11 #include "base/process/process_handle.h"
11 #include "mojo/public/cpp/bindings/interface_request.h" 12 #include "mojo/public/cpp/bindings/interface_request.h"
12 #include "services/shell/public/interfaces/shell_client.mojom.h" 13 #include "services/shell/public/interfaces/shell_client.mojom.h"
13 14
14 namespace base { 15 namespace base {
15 class FilePath; 16 class FilePath;
16 } 17 }
17 18
18 namespace mojo { 19 namespace shell {
19 class Identity; 20 class Identity;
20 namespace shell {
21
22 21
23 // Shell requires implementations of NativeRunner and NativeRunnerFactory to run 22 // Shell requires implementations of NativeRunner and NativeRunnerFactory to run
24 // native applications. 23 // native applications.
25 class NativeRunner { 24 class NativeRunner {
26 public: 25 public:
27 virtual ~NativeRunner() {} 26 virtual ~NativeRunner() {}
28 27
29 // Loads the app in the file at |app_path| and runs it on some other 28 // Loads the app in the file at |app_path| and runs it on some other
30 // thread/process. Returns a ShellClient handle the shell can use to connect 29 // thread/process. Returns a ShellClient handle the shell can use to connect
31 // to the the app. 30 // to the the app.
32 virtual mojom::ShellClientPtr Start( 31 virtual mojom::ShellClientPtr Start(
33 const base::FilePath& app_path, 32 const base::FilePath& app_path,
34 const Identity& target, 33 const Identity& target,
35 bool start_sandboxed, 34 bool start_sandboxed,
36 const base::Callback<void(base::ProcessId)>& pid_available_callback, 35 const base::Callback<void(base::ProcessId)>& pid_available_callback,
37 const base::Closure& app_completed_callback) = 0; 36 const base::Closure& app_completed_callback) = 0;
38 }; 37 };
39 38
40 class NativeRunnerFactory { 39 class NativeRunnerFactory {
41 public: 40 public:
42 virtual ~NativeRunnerFactory() {} 41 virtual ~NativeRunnerFactory() {}
43 virtual scoped_ptr<NativeRunner> Create(const base::FilePath& app_path) = 0; 42 virtual std::unique_ptr<NativeRunner> Create(
43 const base::FilePath& app_path) = 0;
44 }; 44 };
45 45
46 } // namespace shell 46 } // namespace shell
47 } // namespace mojo
48 47
49 #endif // SERVICES_SHELL_NATIVE_RUNNER_H_ 48 #endif // SERVICES_SHELL_NATIVE_RUNNER_H_
OLDNEW
« no previous file with comments | « services/shell/loader.h ('k') | services/shell/native_runner_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698