| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 BASE_NATIVE_LIBRARY_H_ | 5 #ifndef BASE_NATIVE_LIBRARY_H_ |
| 6 #define BASE_NATIVE_LIBRARY_H_ | 6 #define BASE_NATIVE_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // This file defines a cross-platform "NativeLibrary" type which represents | 9 // This file defines a cross-platform "NativeLibrary" type which represents |
| 10 // a loadable module. | 10 // a loadable module. |
| 11 | 11 |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include <windows.h> | 15 #include <windows.h> |
| 16 #elif defined(OS_MACOSX) | 16 #elif defined(OS_MACOSX) |
| 17 #import <Carbon/Carbon.h> | 17 #import <CoreFoundation/CoreFoundation.h> |
| 18 #endif // OS_* | 18 #endif // OS_* |
| 19 | 19 |
| 20 #include "base/string16.h" | 20 #include "base/string16.h" |
| 21 | 21 |
| 22 // Macro useful for writing cross-platform function pointers. | 22 // Macro useful for writing cross-platform function pointers. |
| 23 #if defined(OS_WIN) && !defined(CDECL) | 23 #if defined(OS_WIN) && !defined(CDECL) |
| 24 #define CDECL __cdecl | 24 #define CDECL __cdecl |
| 25 #else | 25 #else |
| 26 #define CDECL | 26 #define CDECL |
| 27 #endif | 27 #endif |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Returns the full platform specific name for a native library. | 64 // Returns the full platform specific name for a native library. |
| 65 // For example: | 65 // For example: |
| 66 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux, | 66 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux, |
| 67 // "mylib.dylib" on Mac. | 67 // "mylib.dylib" on Mac. |
| 68 string16 GetNativeLibraryName(const string16& name); | 68 string16 GetNativeLibraryName(const string16& name); |
| 69 | 69 |
| 70 } // namespace base | 70 } // namespace base |
| 71 | 71 |
| 72 #endif // BASE_NATIVE_LIBRARY_H_ | 72 #endif // BASE_NATIVE_LIBRARY_H_ |
| OLD | NEW |