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

Side by Side Diff: base/native_library.h

Issue 5190005: Fixes a crash in the Windows media player plugin caused when the Real player ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/native_library_win.cc » ('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 (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.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 }; 47 };
48 typedef NativeLibraryStruct* NativeLibrary; 48 typedef NativeLibraryStruct* NativeLibrary;
49 #elif defined(OS_POSIX) 49 #elif defined(OS_POSIX)
50 typedef void* NativeLibrary; 50 typedef void* NativeLibrary;
51 #endif // OS_* 51 #endif // OS_*
52 52
53 // Loads a native library from disk. Release it with UnloadNativeLibrary when 53 // Loads a native library from disk. Release it with UnloadNativeLibrary when
54 // you're done. 54 // you're done.
55 NativeLibrary LoadNativeLibrary(const FilePath& library_path); 55 NativeLibrary LoadNativeLibrary(const FilePath& library_path);
56 56
57 #if defined(OS_WIN)
58 // Loads a native library from disk. Release it with UnloadNativeLibrary when
59 // you're done.
60 // This function retrieves the LoadLibrary function exported from kernel32.dll
61 // and calls it instead of directly calling the LoadLibrary function via the
62 // import table.
63 NativeLibrary LoadNativeLibraryDynamically(const FilePath& library_path);
64 #endif // OS_WIN
65
57 // Unloads a native library. 66 // Unloads a native library.
58 void UnloadNativeLibrary(NativeLibrary library); 67 void UnloadNativeLibrary(NativeLibrary library);
59 68
60 // Gets a function pointer from a native library. 69 // Gets a function pointer from a native library.
61 void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, 70 void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
62 const char* name); 71 const char* name);
63 72
64 // Returns the full platform specific name for a native library. 73 // Returns the full platform specific name for a native library.
65 // For example: 74 // For example:
66 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux, 75 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux,
67 // "mylib.dylib" on Mac. 76 // "mylib.dylib" on Mac.
68 string16 GetNativeLibraryName(const string16& name); 77 string16 GetNativeLibraryName(const string16& name);
69 78
70 } // namespace base 79 } // namespace base
71 80
72 #endif // BASE_NATIVE_LIBRARY_H_ 81 #endif // BASE_NATIVE_LIBRARY_H_
OLDNEW
« no previous file with comments | « no previous file | base/native_library_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698