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

Side by Side Diff: base/native_library.h

Issue 551181: Load bundle resources when loading bundles on the Mac (Closed)
Patch Set: Created 10 years, 10 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
« 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) 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 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 20 matching lines...) Expand all
31 31
32 #if defined(OS_WIN) 32 #if defined(OS_WIN)
33 typedef HMODULE NativeLibrary; 33 typedef HMODULE NativeLibrary;
34 #elif defined(OS_MACOSX) 34 #elif defined(OS_MACOSX)
35 enum NativeLibraryType { 35 enum NativeLibraryType {
36 BUNDLE, 36 BUNDLE,
37 DYNAMIC_LIB 37 DYNAMIC_LIB
38 }; 38 };
39 struct NativeLibraryStruct { 39 struct NativeLibraryStruct {
40 NativeLibraryType type; 40 NativeLibraryType type;
41 CFBundleRefNum bundle_resource_ref;
41 union { 42 union {
42 CFBundleRef bundle; 43 CFBundleRef bundle;
43 void* dylib; 44 void* dylib;
44 }; 45 };
45 }; 46 };
46 typedef NativeLibraryStruct* NativeLibrary; 47 typedef NativeLibraryStruct* NativeLibrary;
47 #elif defined(OS_POSIX) 48 #elif defined(OS_POSIX)
48 typedef void* NativeLibrary; 49 typedef void* NativeLibrary;
49 #endif // OS_* 50 #endif // OS_*
50 51
(...skipping 10 matching lines...) Expand all
61 62
62 // Returns the full platform specific name for a native library. 63 // Returns the full platform specific name for a native library.
63 // For example: 64 // For example:
64 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux, 65 // "mylib" returns "mylib.dll" on Windows, "libmylib.so" on Linux,
65 // "mylib.dylib" on Mac. 66 // "mylib.dylib" on Mac.
66 string16 GetNativeLibraryName(const string16& name); 67 string16 GetNativeLibraryName(const string16& name);
67 68
68 } // namespace base 69 } // namespace base
69 70
70 #endif // BASE_NATIVE_LIBRARY_H_ 71 #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