| OLD | NEW |
| 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 // Note: This header should be compilable as C. | 5 // Note: This header should be compilable as C. |
| 6 | 6 |
| 7 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ | 7 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ |
| 8 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ | 8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| 11 | 11 |
| 12 #include "third_party/mojo/src/mojo/public/c/system/core.h" | 12 #include "mojo/public/c/system/core.h" |
| 13 | 13 |
| 14 // The embedder needs to bind the basic Mojo Core functions of a DSO to those of | 14 // The embedder needs to bind the basic Mojo Core functions of a DSO to those of |
| 15 // the embedder when loading a DSO that is dependent on mojo_system. | 15 // the embedder when loading a DSO that is dependent on mojo_system. |
| 16 // The typical usage would look like: | 16 // The typical usage would look like: |
| 17 // base::ScopedNativeLibrary app_library( | 17 // base::ScopedNativeLibrary app_library( |
| 18 // base::LoadNativeLibrary(app_path_, &error)); | 18 // base::LoadNativeLibrary(app_path_, &error)); |
| 19 // typedef MojoResult (*MojoSetSystemThunksFn)(MojoSystemThunks*); | 19 // typedef MojoResult (*MojoSetSystemThunksFn)(MojoSystemThunks*); |
| 20 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = | 20 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = |
| 21 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( | 21 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( |
| 22 // "MojoSetSystemThunks")); | 22 // "MojoSetSystemThunks")); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Use this type for the function found by dynamically discovering it in | 136 // Use this type for the function found by dynamically discovering it in |
| 137 // a DSO linked with mojo_system. For example: | 137 // a DSO linked with mojo_system. For example: |
| 138 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = | 138 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = |
| 139 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( | 139 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( |
| 140 // "MojoSetSystemThunks")); | 140 // "MojoSetSystemThunks")); |
| 141 // The expected size of |system_thunks} is returned. | 141 // The expected size of |system_thunks} is returned. |
| 142 // The contents of |system_thunks| are copied. | 142 // The contents of |system_thunks| are copied. |
| 143 typedef size_t (*MojoSetSystemThunksFn)( | 143 typedef size_t (*MojoSetSystemThunksFn)( |
| 144 const struct MojoSystemThunks* system_thunks); | 144 const struct MojoSystemThunks* system_thunks); |
| 145 | 145 |
| 146 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ | 146 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ |
| OLD | NEW |