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

Side by Side Diff: base/native_library.h

Issue 12793004: [Mac] Do not unload base::NativeLibary-ies if they contain ObjC segments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The never ending review! Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/native_library_mac.mm » ('j') | base/native_library_mac.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 7
8 // This file defines a cross-platform "NativeLibrary" type which represents 8 // This file defines a cross-platform "NativeLibrary" type which represents
9 // a loadable module. 9 // a loadable module.
10 10
(...skipping 19 matching lines...) Expand all
30 30
31 class FilePath; 31 class FilePath;
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 typedef HMODULE NativeLibrary; 34 typedef HMODULE NativeLibrary;
35 #elif defined(OS_MACOSX) 35 #elif defined(OS_MACOSX)
36 enum NativeLibraryType { 36 enum NativeLibraryType {
37 BUNDLE, 37 BUNDLE,
38 DYNAMIC_LIB 38 DYNAMIC_LIB
39 }; 39 };
40 enum NativeLibraryObjCStatus {
41 OBJC_UNKNOWN,
42 OBJC_PRESENT,
43 OBJC_NOT_PRESENT,
44 };
40 struct NativeLibraryStruct { 45 struct NativeLibraryStruct {
41 NativeLibraryType type; 46 NativeLibraryType type;
42 CFBundleRefNum bundle_resource_ref; 47 CFBundleRefNum bundle_resource_ref;
48 NativeLibraryObjCStatus objc_status;
43 union { 49 union {
44 CFBundleRef bundle; 50 CFBundleRef bundle;
45 void* dylib; 51 void* dylib;
46 }; 52 };
47 }; 53 };
48 typedef NativeLibraryStruct* NativeLibrary; 54 typedef NativeLibraryStruct* NativeLibrary;
49 #elif defined(OS_POSIX) 55 #elif defined(OS_POSIX)
50 typedef void* NativeLibrary; 56 typedef void* NativeLibrary;
51 #endif // OS_* 57 #endif // OS_*
52 58
(...skipping 23 matching lines...) Expand all
76 82
77 // Returns the full platform specific name for a native library. 83 // Returns the full platform specific name for a native library.
78 // For example: 84 // For example:
79 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux, 85 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux,
80 // "mylib.dylib" on Mac. 86 // "mylib.dylib" on Mac.
81 BASE_EXPORT string16 GetNativeLibraryName(const string16& name); 87 BASE_EXPORT string16 GetNativeLibraryName(const string16& name);
82 88
83 } // namespace base 89 } // namespace base
84 90
85 #endif // BASE_NATIVE_LIBRARY_H_ 91 #endif // BASE_NATIVE_LIBRARY_H_
OLDNEW
« no previous file with comments | « no previous file | base/native_library_mac.mm » ('j') | base/native_library_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698