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

Side by Side Diff: services/shell/runner/host/native_application_support.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
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_APPLICATION_SUPPORT_H_ 5 #ifndef SERVICES_SHELL_RUNNER_HOST_NATIVE_APPLICATION_SUPPORT_H_
6 #define SERVICES_SHELL_RUNNER_HOST_NATIVE_APPLICATION_SUPPORT_H_ 6 #define SERVICES_SHELL_RUNNER_HOST_NATIVE_APPLICATION_SUPPORT_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/shell_client.mojom.h" 10 #include "services/shell/public/interfaces/shell_client.mojom.h"
11 11
12 namespace base { 12 namespace base {
13 class FilePath; 13 class FilePath;
14 } 14 }
15 15
16 namespace mojo {
17 class Application;
18 namespace shell { 16 namespace shell {
19 17
20 // Loads the native Mojo application from the DSO specified by |app_path|. 18 // Loads the native Mojo application from the DSO specified by |app_path|.
21 // Returns the |base::NativeLibrary| for the application on success (or null on 19 // Returns the |base::NativeLibrary| for the application on success (or null on
22 // failure). 20 // failure).
23 // 21 //
24 // 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,
25 // this should be done only after the thread on which |LoadNativeApplication()| 23 // this should be done only after the thread on which |LoadNativeApplication()|
26 // and |RunNativeApplication()| were called has terminated, so that any 24 // and |RunNativeApplication()| were called has terminated, so that any
27 // thread-local destructors have been executed. 25 // thread-local destructors have been executed.
28 base::NativeLibrary LoadNativeApplication(const base::FilePath& app_path); 26 base::NativeLibrary LoadNativeApplication(const base::FilePath& app_path);
29 27
30 // Runs the native Mojo application from the DSO that was loaded using 28 // Runs the native Mojo application from the DSO that was loaded using
31 // |LoadNativeApplication()|; this tolerates |app_library| being null. This 29 // |LoadNativeApplication()|; this tolerates |app_library| being null. This
32 // should be called on the same thread as |LoadNativeApplication()|. Returns 30 // should be called on the same thread as |LoadNativeApplication()|. Returns
33 // true if |MojoMain()| was called (even if it returns an error), and false 31 // true if |MojoMain()| was called (even if it returns an error), and false
34 // otherwise. 32 // otherwise.
35 bool RunNativeApplication(base::NativeLibrary app_library, 33 bool RunNativeApplication(base::NativeLibrary app_library,
36 InterfaceRequest<mojom::ShellClient> request); 34 mojom::ShellClientRequest request);
37 35
38 } // namespace shell 36 } // namespace shell
39 } // namespace mojo
40 37
41 #endif // SERVICES_SHELL_RUNNER_HOST_NATIVE_APPLICATION_SUPPORT_H_ 38 #endif // SERVICES_SHELL_RUNNER_HOST_NATIVE_APPLICATION_SUPPORT_H_
OLDNEW
« no previous file with comments | « services/shell/runner/host/mach_broker.cc ('k') | services/shell/runner/host/native_application_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698