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

Side by Side Diff: Source/WebCore/platform/FileSystem.h

Issue 13529026: Removing a bunch of unused platform code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace and compiler error on Mac. Created 7 years, 8 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 | « Source/WebCore/platform/DragImage.h ('k') | Source/WebCore/platform/LocalizedStrings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Collabora, Ltd. All rights reserved. 3 * Copyright (C) 2008 Collabora, Ltd. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 22 matching lines...) Expand all
33 #include <time.h> 33 #include <time.h>
34 #include <wtf/Forward.h> 34 #include <wtf/Forward.h>
35 #include <wtf/MathExtras.h> 35 #include <wtf/MathExtras.h>
36 #include <wtf/Vector.h> 36 #include <wtf/Vector.h>
37 #include <wtf/text/WTFString.h> 37 #include <wtf/text/WTFString.h>
38 38
39 #if USE(CF) 39 #if USE(CF)
40 #include <wtf/RetainPtr.h> 40 #include <wtf/RetainPtr.h>
41 #endif 41 #endif
42 42
43 #if PLATFORM(QT) 43 #if USE(CF)
44 #include <QFile>
45 #include <QLibrary>
46 #if defined(Q_OS_WIN32)
47 #include <windows.h>
48 #endif
49 #endif
50
51 #if USE(CF) || (PLATFORM(QT) && defined(Q_WS_MAC))
52 typedef struct __CFBundle* CFBundleRef; 44 typedef struct __CFBundle* CFBundleRef;
53 typedef const struct __CFData* CFDataRef; 45 typedef const struct __CFData* CFDataRef;
54 #endif 46 #endif
55 47
56 #if OS(WINDOWS) 48 #if OS(WINDOWS)
57 // These are to avoid including <winbase.h> in a header for Chromium 49 // These are to avoid including <winbase.h> in a header for Chromium
58 typedef void *HANDLE; 50 typedef void *HANDLE;
59 // Assuming STRICT 51 // Assuming STRICT
60 typedef struct HINSTANCE__* HINSTANCE; 52 typedef struct HINSTANCE__* HINSTANCE;
61 typedef HINSTANCE HMODULE; 53 typedef HINSTANCE HMODULE;
62 #endif 54 #endif
63 55
64 #if PLATFORM(GTK)
65 typedef struct _GFileIOStream GFileIOStream;
66 typedef struct _GModule GModule;
67 #endif
68 56
69 namespace WebCore { 57 namespace WebCore {
70 58
71 // PlatformModule 59 // PlatformModule
72 #if OS(WINDOWS) 60 #if OS(WINDOWS)
73 typedef HMODULE PlatformModule; 61 typedef HMODULE PlatformModule;
74 #elif PLATFORM(GTK)
75 typedef GModule* PlatformModule;
76 #elif PLATFORM(QT)
77 #if defined(Q_WS_MAC)
78 typedef CFBundleRef PlatformModule;
79 #elif !defined(QT_NO_LIBRARY)
80 typedef QLibrary* PlatformModule;
81 #else
82 typedef void* PlatformModule;
83 #endif
84 #elif USE(CF) 62 #elif USE(CF)
85 typedef CFBundleRef PlatformModule; 63 typedef CFBundleRef PlatformModule;
86 #else 64 #else
87 typedef void* PlatformModule; 65 typedef void* PlatformModule;
88 #endif 66 #endif
89 67
90 // PlatformModuleVersion 68 // PlatformModuleVersion
91 #if OS(WINDOWS) 69 #if OS(WINDOWS)
92 struct PlatformModuleVersion { 70 struct PlatformModuleVersion {
93 unsigned leastSig; 71 unsigned leastSig;
(...skipping 10 matching lines...) Expand all
104 , mostSig(msb) 82 , mostSig(msb)
105 { 83 {
106 } 84 }
107 85
108 }; 86 };
109 #else 87 #else
110 typedef unsigned PlatformModuleVersion; 88 typedef unsigned PlatformModuleVersion;
111 #endif 89 #endif
112 90
113 // PlatformFileHandle 91 // PlatformFileHandle
114 #if PLATFORM(QT) 92 #if OS(WINDOWS)
115 typedef QFile* PlatformFileHandle;
116 const PlatformFileHandle invalidPlatformFileHandle = 0;
117 #elif PLATFORM(GTK)
118 typedef GFileIOStream* PlatformFileHandle;
119 const PlatformFileHandle invalidPlatformFileHandle = 0;
120 #elif OS(WINDOWS)
121 typedef HANDLE PlatformFileHandle; 93 typedef HANDLE PlatformFileHandle;
122 // FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to 94 // FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
123 // avoid using Windows headers in headers. We'd rather move this into the .cpp. 95 // avoid using Windows headers in headers. We'd rather move this into the .cpp.
124 const PlatformFileHandle invalidPlatformFileHandle = reinterpret_cast<HANDLE>(-1 ); 96 const PlatformFileHandle invalidPlatformFileHandle = reinterpret_cast<HANDLE>(-1 );
125 #else 97 #else
126 typedef int PlatformFileHandle; 98 typedef int PlatformFileHandle;
127 const PlatformFileHandle invalidPlatformFileHandle = -1; 99 const PlatformFileHandle invalidPlatformFileHandle = -1;
128 #endif 100 #endif
129 101
130 enum FileOpenMode { 102 enum FileOpenMode {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 166
195 // Functions for working with loadable modules. 167 // Functions for working with loadable modules.
196 bool unloadModule(PlatformModule); 168 bool unloadModule(PlatformModule);
197 169
198 // Encode a string for use within a file name. 170 // Encode a string for use within a file name.
199 String encodeForFileName(const String&); 171 String encodeForFileName(const String&);
200 172
201 #if USE(CF) 173 #if USE(CF)
202 RetainPtr<CFURLRef> pathAsURL(const String&); 174 RetainPtr<CFURLRef> pathAsURL(const String&);
203 #endif 175 #endif
204 176 #if USE(SOUP)
205 #if PLATFORM(MAC)
206 void setMetadataURL(String& URLString, const String& referrer, const String& pat h);
207 #endif
208
209 #if PLATFORM(GTK)
210 String filenameToString(const char*);
211 String filenameForDisplay(const String&);
212 CString applicationDirectoryPath();
213 CString sharedResourcesPath();
214 #endif
215 #if USE(SOUP) || PLATFORM(QT)
216 uint64_t getVolumeFreeSizeForPath(const char*); 177 uint64_t getVolumeFreeSizeForPath(const char*);
217 #endif 178 #endif
218 179
219 #if PLATFORM(WIN) && !OS(WINCE)
220 String localUserSpecificStorageDirectory();
221 String roamingUserSpecificStorageDirectory();
222 #endif
223
224 #if PLATFORM(WIN) && USE(CF)
225 bool safeCreateFile(const String&, CFDataRef);
226 #endif
227
228 } // namespace WebCore 180 } // namespace WebCore
229 181
230 #endif // FileSystem_h 182 #endif // FileSystem_h
OLDNEW
« no previous file with comments | « Source/WebCore/platform/DragImage.h ('k') | Source/WebCore/platform/LocalizedStrings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698