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

Side by Side Diff: services/service_manager/runner/host/native_library_runner.h

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_RUNNER_HOST_NATIVE_LIBRARY_RUNNER_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_RUNNER_HOST_NATIVE_LIBRARY_RUNNER_H_
6 #define SERVICES_SHELL_RUNNER_HOST_NATIVE_LIBRARY_RUNNER_H_ 6 #define SERVICES_SERVICE_MANAGER_RUNNER_HOST_NATIVE_LIBRARY_RUNNER_H_
7 7
8 #include "base/native_library.h" 8 #include "base/native_library.h"
9 #include "mojo/public/cpp/bindings/interface_request.h" 9 #include "mojo/public/cpp/bindings/interface_request.h"
10 #include "services/shell/public/interfaces/service.mojom.h" 10 #include "services/service_manager/public/interfaces/service.mojom.h"
11 11
12 namespace base { 12 namespace base {
13 class FilePath; 13 class FilePath;
14 } 14 }
15 15
16 namespace shell { 16 namespace shell {
17 17
18 // Loads the native Service from the DSO specified by |app_path|. 18 // Loads the native Service from the DSO specified by |app_path|.
19 // Returns the |base::NativeLibrary| for the service on success (or null on 19 // Returns the |base::NativeLibrary| for the service on success (or null on
20 // failure). 20 // failure).
21 // 21 //
22 // Note: The caller may choose to eventually unload the returned DSO. If so, 22 // Note: The caller may choose to eventually unload the returned DSO. If so,
23 // this should be done only after the thread on which |LoadNativeLibrary()| 23 // this should be done only after the thread on which |LoadNativeLibrary()|
24 // and |RunServiceInNativeLibrary()| were called has terminated, so that any 24 // and |RunServiceInNativeLibrary()| were called has terminated, so that any
25 // thread-local destructors have been executed. 25 // thread-local destructors have been executed.
26 base::NativeLibrary LoadNativeLibrary(const base::FilePath& app_path); 26 base::NativeLibrary LoadNativeLibrary(const base::FilePath& app_path);
27 27
28 // Runs the native Service from the DSO that was loaded using 28 // Runs the native Service from the DSO that was loaded using
29 // |LoadNativeLibrary()|; this tolerates |library| being null. This should be 29 // |LoadNativeLibrary()|; this tolerates |library| being null. This should be
30 // called on the same thread as |LoadNativeLibrary()|. Returns true if 30 // called on the same thread as |LoadNativeLibrary()|. Returns true if
31 // |ServiceMain()| was called (even if it returns an error), and false 31 // |ServiceMain()| was called (even if it returns an error), and false
32 // otherwise. 32 // otherwise.
33 bool RunServiceInNativeLibrary(base::NativeLibrary library, 33 bool RunServiceInNativeLibrary(base::NativeLibrary library,
34 mojom::ServiceRequest request); 34 mojom::ServiceRequest request);
35 35
36 } // namespace shell 36 } // namespace shell
37 37
38 #endif // SERVICES_SHELL_RUNNER_HOST_NATIVE_LIBRARY_RUNNER_H_ 38 #endif // SERVICES_SERVICE_MANAGER_RUNNER_HOST_NATIVE_LIBRARY_RUNNER_H_
OLDNEW
« no previous file with comments | « services/service_manager/runner/host/mach_broker.cc ('k') | services/service_manager/runner/host/native_library_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698