OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 struct WebFloatPoint; | 116 struct WebFloatPoint; |
117 class WebThemeEngine; | 117 class WebThemeEngine; |
118 class WebThread; | 118 class WebThread; |
119 class WebTrialTokenValidator; | 119 class WebTrialTokenValidator; |
120 class WebURL; | 120 class WebURL; |
121 class WebURLLoader; | 121 class WebURLLoader; |
122 class WebUnitTestSupport; | 122 class WebUnitTestSupport; |
123 struct WebLocalizedString; | 123 struct WebLocalizedString; |
124 struct WebSize; | 124 struct WebSize; |
125 | 125 |
126 class Platform { | 126 class BLINK_PLATFORM_EXPORT_CLASS Platform { |
dcheng
2016/03/07 04:42:08
Just use BLINK_PLATFORM_EXPORT
Mostyn Bramley-Moore
2016/03/07 06:38:31
This was a workaround to keep visual studio happy,
dcheng
2016/03/07 16:15:47
That's OK, the export macros were never really mea
Mostyn Bramley-Moore
2016/03/07 17:32:08
I'm curious- what else do GCC visibility attribute
dcheng
2016/03/07 19:27:03
I think this is the main thing (controlling symbol
| |
127 public: | 127 public: |
128 // HTML5 Database ------------------------------------------------------ | 128 // HTML5 Database ------------------------------------------------------ |
129 | 129 |
130 #ifdef WIN32 | 130 #ifdef WIN32 |
131 typedef HANDLE FileHandle; | 131 typedef HANDLE FileHandle; |
132 #else | 132 #else |
133 typedef int FileHandle; | 133 typedef int FileHandle; |
134 #endif | 134 #endif |
135 | 135 |
136 BLINK_PLATFORM_EXPORT static void initialize(Platform*); | 136 BLINK_PLATFORM_EXPORT static void initialize(Platform*); |
137 BLINK_PLATFORM_EXPORT static void shutdown(); | 137 BLINK_PLATFORM_EXPORT static void shutdown(); |
138 BLINK_PLATFORM_EXPORT static Platform* current(); | 138 BLINK_PLATFORM_EXPORT static Platform* current(); |
139 | 139 |
140 // May return null. | 140 // May return null. |
141 virtual WebCookieJar* cookieJar() { return nullptr; } | 141 BLINK_PLATFORM_HIDDEN virtual WebCookieJar* cookieJar() { return nullptr; } |
dcheng
2016/03/07 04:42:08
Why do we need to mark these as hidden? Why not ju
Mostyn Bramley-Moore
2016/03/07 06:38:31
It's possible to do that, the only difference is t
| |
142 | 142 |
143 // Must return non-null. | 143 // Must return non-null. |
144 virtual WebClipboard* clipboard() { return nullptr; } | 144 BLINK_PLATFORM_HIDDEN virtual WebClipboard* clipboard() { return nullptr; } |
145 | 145 |
146 // Must return non-null. | 146 // Must return non-null. |
147 virtual WebFileUtilities* fileUtilities() { return nullptr; } | 147 BLINK_PLATFORM_HIDDEN virtual WebFileUtilities* fileUtilities() { return nul lptr; } |
148 | 148 |
149 // Must return non-null. | 149 // Must return non-null. |
150 virtual WebMimeRegistry* mimeRegistry() { return nullptr; } | 150 BLINK_PLATFORM_HIDDEN virtual WebMimeRegistry* mimeRegistry() { return nullp tr; } |
151 | 151 |
152 // May return null if sandbox support is not necessary | 152 // May return null if sandbox support is not necessary |
153 virtual WebSandboxSupport* sandboxSupport() { return nullptr; } | 153 BLINK_PLATFORM_HIDDEN virtual WebSandboxSupport* sandboxSupport() { return n ullptr; } |
154 | 154 |
155 // May return null on some platforms. | 155 // May return null on some platforms. |
156 virtual WebThemeEngine* themeEngine() { return nullptr; } | 156 BLINK_PLATFORM_HIDDEN virtual WebThemeEngine* themeEngine() { return nullptr ; } |
157 | 157 |
158 virtual WebFallbackThemeEngine* fallbackThemeEngine() { return nullptr; } | 158 BLINK_PLATFORM_HIDDEN virtual WebFallbackThemeEngine* fallbackThemeEngine() { return nullptr; } |
159 | 159 |
160 // May return null. | 160 // May return null. |
161 virtual WebSpeechSynthesizer* createSpeechSynthesizer(WebSpeechSynthesizerCl ient*) { return nullptr; } | 161 BLINK_PLATFORM_HIDDEN virtual WebSpeechSynthesizer* createSpeechSynthesizer( WebSpeechSynthesizerClient*) { return nullptr; } |
162 | 162 |
163 | 163 |
164 // Audio -------------------------------------------------------------- | 164 // Audio -------------------------------------------------------------- |
165 | 165 |
166 virtual double audioHardwareSampleRate() { return 0; } | 166 BLINK_PLATFORM_HIDDEN virtual double audioHardwareSampleRate() { return 0; } |
167 virtual size_t audioHardwareBufferSize() { return 0; } | 167 BLINK_PLATFORM_HIDDEN virtual size_t audioHardwareBufferSize() { return 0; } |
168 virtual unsigned audioHardwareOutputChannels() { return 0; } | 168 BLINK_PLATFORM_HIDDEN virtual unsigned audioHardwareOutputChannels() { retur n 0; } |
169 | 169 |
170 // Creates a device for audio I/O. | 170 // Creates a device for audio I/O. |
171 // Pass in (numberOfInputChannels > 0) if live/local audio input is desired. | 171 // Pass in (numberOfInputChannels > 0) if live/local audio input is desired. |
172 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*, const WebString& deviceId, const WebSecurityOrigin&) { return nu llptr; } | 172 BLINK_PLATFORM_HIDDEN virtual WebAudioDevice* createAudioDevice(size_t buffe rSize, unsigned numberOfInputChannels, unsigned numberOfChannels, double sampleR ate, WebAudioDevice::RenderCallback*, const WebString& deviceId, const WebSecuri tyOrigin&) { return nullptr; } |
173 | 173 |
174 | 174 |
175 // MIDI ---------------------------------------------------------------- | 175 // MIDI ---------------------------------------------------------------- |
176 | 176 |
177 // Creates a platform dependent WebMIDIAccessor. MIDIAccessor under platform | 177 // Creates a platform dependent WebMIDIAccessor. MIDIAccessor under platform |
178 // creates and owns it. | 178 // creates and owns it. |
179 virtual WebMIDIAccessor* createMIDIAccessor(WebMIDIAccessorClient*) { return nullptr; } | 179 BLINK_PLATFORM_HIDDEN virtual WebMIDIAccessor* createMIDIAccessor(WebMIDIAcc essorClient*) { return nullptr; } |
180 | 180 |
181 | 181 |
182 // Blob ---------------------------------------------------------------- | 182 // Blob ---------------------------------------------------------------- |
183 | 183 |
184 // Must return non-null. | 184 // Must return non-null. |
185 virtual WebBlobRegistry* blobRegistry() { return nullptr; } | 185 BLINK_PLATFORM_HIDDEN virtual WebBlobRegistry* blobRegistry() { return nullp tr; } |
186 | 186 |
187 // Database ------------------------------------------------------------ | 187 // Database ------------------------------------------------------------ |
188 | 188 |
189 // Opens a database file; dirHandle should be 0 if the caller does not need | 189 // Opens a database file; dirHandle should be 0 if the caller does not need |
190 // a handle to the directory containing this file | 190 // a handle to the directory containing this file |
191 virtual FileHandle databaseOpenFile(const WebString& vfsFileName, int desire dFlags) { return FileHandle(); } | 191 BLINK_PLATFORM_HIDDEN virtual FileHandle databaseOpenFile(const WebString& v fsFileName, int desiredFlags) { return FileHandle(); } |
192 | 192 |
193 // Deletes a database file and returns the error code | 193 // Deletes a database file and returns the error code |
194 virtual int databaseDeleteFile(const WebString& vfsFileName, bool syncDir) { return 0; } | 194 BLINK_PLATFORM_HIDDEN virtual int databaseDeleteFile(const WebString& vfsFil eName, bool syncDir) { return 0; } |
195 | 195 |
196 // Returns the attributes of the given database file | 196 // Returns the attributes of the given database file |
197 virtual long databaseGetFileAttributes(const WebString& vfsFileName) { retur n 0; } | 197 BLINK_PLATFORM_HIDDEN virtual long databaseGetFileAttributes(const WebString & vfsFileName) { return 0; } |
198 | 198 |
199 // Returns the size of the given database file | 199 // Returns the size of the given database file |
200 virtual long long databaseGetFileSize(const WebString& vfsFileName) { return 0; } | 200 BLINK_PLATFORM_HIDDEN virtual long long databaseGetFileSize(const WebString& vfsFileName) { return 0; } |
201 | 201 |
202 // Returns the space available for the given origin | 202 // Returns the space available for the given origin |
203 virtual long long databaseGetSpaceAvailableForOrigin(const WebString& origin Identifier) { return 0; } | 203 BLINK_PLATFORM_HIDDEN virtual long long databaseGetSpaceAvailableForOrigin(c onst WebString& originIdentifier) { return 0; } |
204 | 204 |
205 // Set the size of the given database file | 205 // Set the size of the given database file |
206 virtual bool databaseSetFileSize(const WebString& vfsFileName, long long siz e) { return false; } | 206 BLINK_PLATFORM_HIDDEN virtual bool databaseSetFileSize(const WebString& vfsF ileName, long long size) { return false; } |
207 | 207 |
208 | 208 |
209 // DOM Storage -------------------------------------------------- | 209 // DOM Storage -------------------------------------------------- |
210 | 210 |
211 // Return a LocalStorage namespace | 211 // Return a LocalStorage namespace |
212 virtual WebStorageNamespace* createLocalStorageNamespace() { return nullptr; } | 212 BLINK_PLATFORM_HIDDEN virtual WebStorageNamespace* createLocalStorageNamespa ce() { return nullptr; } |
213 | 213 |
214 | 214 |
215 // FileSystem ---------------------------------------------------------- | 215 // FileSystem ---------------------------------------------------------- |
216 | 216 |
217 // Must return non-null. | 217 // Must return non-null. |
218 virtual WebFileSystem* fileSystem() { return nullptr; } | 218 BLINK_PLATFORM_HIDDEN virtual WebFileSystem* fileSystem() { return nullptr; } |
219 | 219 |
220 | 220 |
221 // IDN conversion ------------------------------------------------------ | 221 // IDN conversion ------------------------------------------------------ |
222 | 222 |
223 virtual WebString convertIDNToUnicode(const WebString& host, const WebString & languages) { return host; } | 223 BLINK_PLATFORM_HIDDEN virtual WebString convertIDNToUnicode(const WebString& host, const WebString& languages) { return host; } |
224 | 224 |
225 | 225 |
226 // IndexedDB ---------------------------------------------------------- | 226 // IndexedDB ---------------------------------------------------------- |
227 | 227 |
228 // Must return non-null. | 228 // Must return non-null. |
229 virtual WebIDBFactory* idbFactory() { return nullptr; } | 229 BLINK_PLATFORM_HIDDEN virtual WebIDBFactory* idbFactory() { return nullptr; } |
230 | 230 |
231 | 231 |
232 // Cache Storage ---------------------------------------------------------- | 232 // Cache Storage ---------------------------------------------------------- |
233 | 233 |
234 // The caller is responsible for deleting the returned object. | 234 // The caller is responsible for deleting the returned object. |
235 virtual WebServiceWorkerCacheStorage* cacheStorage(const WebSecurityOrigin&) { return nullptr; } | 235 BLINK_PLATFORM_HIDDEN virtual WebServiceWorkerCacheStorage* cacheStorage(con st WebSecurityOrigin&) { return nullptr; } |
236 | 236 |
237 // Gamepad ------------------------------------------------------------- | 237 // Gamepad ------------------------------------------------------------- |
238 | 238 |
239 virtual void sampleGamepads(WebGamepads& into) { into.length = 0; } | 239 BLINK_PLATFORM_HIDDEN virtual void sampleGamepads(WebGamepads& into) { into. length = 0; } |
240 | 240 |
241 // History ------------------------------------------------------------- | 241 // History ------------------------------------------------------------- |
242 | 242 |
243 // Returns the hash for the given canonicalized URL for use in visited | 243 // Returns the hash for the given canonicalized URL for use in visited |
244 // link coloring. | 244 // link coloring. |
245 virtual unsigned long long visitedLinkHash( | 245 BLINK_PLATFORM_HIDDEN virtual unsigned long long visitedLinkHash( |
246 const char* canonicalURL, size_t length) { return 0; } | 246 const char* canonicalURL, size_t length) { return 0; } |
247 | 247 |
248 // Returns whether the given link hash is in the user's history. The | 248 // Returns whether the given link hash is in the user's history. The |
249 // hash must have been generated by calling VisitedLinkHash(). | 249 // hash must have been generated by calling VisitedLinkHash(). |
250 virtual bool isLinkVisited(unsigned long long linkHash) { return false; } | 250 BLINK_PLATFORM_HIDDEN virtual bool isLinkVisited(unsigned long long linkHash ) { return false; } |
251 | 251 |
252 | 252 |
253 // Keygen -------------------------------------------------------------- | 253 // Keygen -------------------------------------------------------------- |
254 | 254 |
255 // Handle the <keygen> tag for generating client certificates | 255 // Handle the <keygen> tag for generating client certificates |
256 // Returns a base64 encoded signed copy of a public key from a newly | 256 // Returns a base64 encoded signed copy of a public key from a newly |
257 // generated key pair and the supplied challenge string. keySizeindex | 257 // generated key pair and the supplied challenge string. keySizeindex |
258 // specifies the strength of the key. | 258 // specifies the strength of the key. |
259 virtual WebString signedPublicKeyAndChallengeString( | 259 BLINK_PLATFORM_HIDDEN virtual WebString signedPublicKeyAndChallengeString( |
260 unsigned keySizeIndex, const WebString& challenge, const WebURL& url, co nst WebURL& topOrigin) | 260 unsigned keySizeIndex, const WebString& challenge, const WebURL& url, co nst WebURL& topOrigin) |
261 { | 261 { |
262 return WebString(); | 262 return WebString(); |
263 } | 263 } |
264 | 264 |
265 // Same as above, but always returns actual value, without any caches. | 265 // Same as above, but always returns actual value, without any caches. |
266 virtual size_t actualMemoryUsageMB() { return 0; } | 266 BLINK_PLATFORM_HIDDEN virtual size_t actualMemoryUsageMB() { return 0; } |
267 | 267 |
268 // Return the number of of processors of the current machine. | 268 // Return the number of of processors of the current machine. |
269 virtual size_t numberOfProcessors() { return 0; } | 269 BLINK_PLATFORM_HIDDEN virtual size_t numberOfProcessors() { return 0; } |
270 | 270 |
271 // Allocates discardable memory. May return nullptr, even if the platform su pports | 271 // Allocates discardable memory. May return nullptr, even if the platform su pports |
272 // discardable memory. If nonzero, however, then the WebDiscardableMmeory is | 272 // discardable memory. If nonzero, however, then the WebDiscardableMmeory is |
273 // returned in an locked state. You may use its underlying data() member | 273 // returned in an locked state. You may use its underlying data() member |
274 // directly, taking care to unlock it when you are ready to let it become | 274 // directly, taking care to unlock it when you are ready to let it become |
275 // discardable. | 275 // discardable. |
276 virtual WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) { return nullptr; } | 276 BLINK_PLATFORM_HIDDEN virtual WebDiscardableMemory* allocateAndLockDiscardab leMemory(size_t bytes) { return nullptr; } |
277 | 277 |
278 static const size_t noDecodedImageByteLimit = static_cast<size_t>(-1); | 278 BLINK_PLATFORM_HIDDEN static const size_t noDecodedImageByteLimit = static_c ast<size_t>(-1); |
279 | 279 |
280 // Returns the maximum amount of memory a decoded image should be allowed. | 280 // Returns the maximum amount of memory a decoded image should be allowed. |
281 // See comments on ImageDecoder::m_maxDecodedBytes. | 281 // See comments on ImageDecoder::m_maxDecodedBytes. |
282 virtual size_t maxDecodedImageBytes() { return noDecodedImageByteLimit; } | 282 BLINK_PLATFORM_HIDDEN virtual size_t maxDecodedImageBytes() { return noDecod edImageByteLimit; } |
283 | 283 |
284 // Process ------------------------------------------------------------- | 284 // Process ------------------------------------------------------------- |
285 | 285 |
286 // Returns a unique identifier for a process. This may not necessarily be | 286 // Returns a unique identifier for a process. This may not necessarily be |
287 // the process's process ID. | 287 // the process's process ID. |
288 virtual uint32_t getUniqueIdForProcess() { return 0; } | 288 BLINK_PLATFORM_HIDDEN virtual uint32_t getUniqueIdForProcess() { return 0; } |
289 | 289 |
290 | 290 |
291 // Message Ports ------------------------------------------------------- | 291 // Message Ports ------------------------------------------------------- |
292 | 292 |
293 // Creates a Message Port Channel pair. This can be called on any thread. | 293 // Creates a Message Port Channel pair. This can be called on any thread. |
294 // The returned objects should only be used on the thread they were created on. | 294 // The returned objects should only be used on the thread they were created on. |
295 virtual void createMessageChannel(WebMessagePortChannel** channel1, WebMessa gePortChannel** channel2) { *channel1 = 0; *channel2 = 0; } | 295 BLINK_PLATFORM_HIDDEN virtual void createMessageChannel(WebMessagePortChanne l** channel1, WebMessagePortChannel** channel2) { *channel1 = 0; *channel2 = 0; } |
296 | 296 |
297 | 297 |
298 // Network ------------------------------------------------------------- | 298 // Network ------------------------------------------------------------- |
299 | 299 |
300 // Returns a new WebURLLoader instance. | 300 // Returns a new WebURLLoader instance. |
301 virtual WebURLLoader* createURLLoader() { return nullptr; } | 301 BLINK_PLATFORM_HIDDEN virtual WebURLLoader* createURLLoader() { return nullp tr; } |
302 | 302 |
303 // May return null. | 303 // May return null. |
304 virtual WebPrescientNetworking* prescientNetworking() { return nullptr; } | 304 BLINK_PLATFORM_HIDDEN virtual WebPrescientNetworking* prescientNetworking() { return nullptr; } |
305 | 305 |
306 // Returns a new WebSocketHandle instance. | 306 // Returns a new WebSocketHandle instance. |
307 virtual WebSocketHandle* createWebSocketHandle() { return nullptr; } | 307 BLINK_PLATFORM_HIDDEN virtual WebSocketHandle* createWebSocketHandle() { ret urn nullptr; } |
308 | 308 |
309 // Returns the User-Agent string. | 309 // Returns the User-Agent string. |
310 virtual WebString userAgent() { return WebString(); } | 310 BLINK_PLATFORM_HIDDEN virtual WebString userAgent() { return WebString(); } |
311 | 311 |
312 // A suggestion to cache this metadata in association with this URL. | 312 // A suggestion to cache this metadata in association with this URL. |
313 virtual void cacheMetadata(const WebURL&, int64_t responseTime, const char* data, size_t dataSize) { } | 313 BLINK_PLATFORM_HIDDEN virtual void cacheMetadata(const WebURL&, int64_t resp onseTime, const char* data, size_t dataSize) { } |
314 | 314 |
315 // Returns the decoded data url if url had a supported mimetype and parsing was successful. | 315 // Returns the decoded data url if url had a supported mimetype and parsing was successful. |
316 virtual WebData parseDataURL(const WebURL&, WebString& mimetype, WebString& charset) { return WebData(); } | 316 BLINK_PLATFORM_HIDDEN virtual WebData parseDataURL(const WebURL&, WebString& mimetype, WebString& charset) { return WebData(); } |
317 | 317 |
318 virtual WebURLError cancelledError(const WebURL&) const { return WebURLError (); } | 318 BLINK_PLATFORM_HIDDEN virtual WebURLError cancelledError(const WebURL&) cons t { return WebURLError(); } |
319 | 319 |
320 virtual bool isReservedIPAddress(const WebString& host) const { return false ; } | 320 BLINK_PLATFORM_HIDDEN virtual bool isReservedIPAddress(const WebString& host ) const { return false; } |
321 | 321 |
322 virtual bool portAllowed(const WebURL&) const { return false; } | 322 BLINK_PLATFORM_HIDDEN virtual bool portAllowed(const WebURL&) const { return false; } |
323 | 323 |
324 // Plugins ------------------------------------------------------------- | 324 // Plugins ------------------------------------------------------------- |
325 | 325 |
326 // If refresh is true, then cached information should not be used to | 326 // If refresh is true, then cached information should not be used to |
327 // satisfy this call. | 327 // satisfy this call. |
328 virtual void getPluginList(bool refresh, WebPluginListBuilder*) { } | 328 BLINK_PLATFORM_HIDDEN virtual void getPluginList(bool refresh, WebPluginList Builder*) { } |
329 | 329 |
330 | 330 |
331 // Public Suffix List -------------------------------------------------- | 331 // Public Suffix List -------------------------------------------------- |
332 | 332 |
333 // May return null on some platforms. | 333 // May return null on some platforms. |
334 virtual WebPublicSuffixList* publicSuffixList() { return nullptr; } | 334 BLINK_PLATFORM_HIDDEN virtual WebPublicSuffixList* publicSuffixList() { retu rn nullptr; } |
335 | 335 |
336 | 336 |
337 // Resources ----------------------------------------------------------- | 337 // Resources ----------------------------------------------------------- |
338 | 338 |
339 // Returns a localized string resource (with substitution parameters). | 339 // Returns a localized string resource (with substitution parameters). |
340 virtual WebString queryLocalizedString(WebLocalizedString::Name) { return We bString(); } | 340 BLINK_PLATFORM_HIDDEN virtual WebString queryLocalizedString(WebLocalizedStr ing::Name) { return WebString(); } |
341 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt ring& parameter) { return WebString(); } | 341 BLINK_PLATFORM_HIDDEN virtual WebString queryLocalizedString(WebLocalizedStr ing::Name, const WebString& parameter) { return WebString(); } |
342 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt ring& parameter1, const WebString& parameter2) { return WebString(); } | 342 BLINK_PLATFORM_HIDDEN virtual WebString queryLocalizedString(WebLocalizedStr ing::Name, const WebString& parameter1, const WebString& parameter2) { return We bString(); } |
343 | 343 |
344 | 344 |
345 // Threads ------------------------------------------------------- | 345 // Threads ------------------------------------------------------- |
346 | 346 |
347 // Creates an embedder-defined thread. | 347 // Creates an embedder-defined thread. |
348 virtual WebThread* createThread(const char* name) { return nullptr; } | 348 BLINK_PLATFORM_HIDDEN virtual WebThread* createThread(const char* name) { re turn nullptr; } |
349 | 349 |
350 // Returns an interface to the current thread. This is owned by the | 350 // Returns an interface to the current thread. This is owned by the |
351 // embedder. | 351 // embedder. |
352 virtual WebThread* currentThread() { return nullptr; } | 352 BLINK_PLATFORM_HIDDEN virtual WebThread* currentThread() { return nullptr; } |
353 | 353 |
354 // Resources ----------------------------------------------------------- | 354 // Resources ----------------------------------------------------------- |
355 | 355 |
356 // Returns a blob of data corresponding to the named resource. | 356 // Returns a blob of data corresponding to the named resource. |
357 virtual WebData loadResource(const char* name) { return WebData(); } | 357 BLINK_PLATFORM_HIDDEN virtual WebData loadResource(const char* name) { retur n WebData(); } |
358 | 358 |
359 // Decodes the in-memory audio file data and returns the linear PCM audio da ta in the destinationBus. | 359 // Decodes the in-memory audio file data and returns the linear PCM audio da ta in the destinationBus. |
360 // A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate. | 360 // A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate. |
361 // Returns true on success. | 361 // Returns true on success. |
362 virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audi oFileData, size_t dataSize) { return false; } | 362 BLINK_PLATFORM_HIDDEN virtual bool loadAudioResource(WebAudioBus* destinatio nBus, const char* audioFileData, size_t dataSize) { return false; } |
363 | 363 |
364 // Screen ------------------------------------------------------------- | 364 // Screen ------------------------------------------------------------- |
365 | 365 |
366 // Supplies the system monitor color profile. | 366 // Supplies the system monitor color profile. |
367 virtual void screenColorProfile(WebVector<char>* profile) { } | 367 BLINK_PLATFORM_HIDDEN virtual void screenColorProfile(WebVector<char>* profi le) { } |
368 | 368 |
369 | 369 |
370 // Scrollbar ---------------------------------------------------------- | 370 // Scrollbar ---------------------------------------------------------- |
371 | 371 |
372 // Must return non-null. | 372 // Must return non-null. |
373 virtual WebScrollbarBehavior* scrollbarBehavior() { return nullptr; } | 373 BLINK_PLATFORM_HIDDEN virtual WebScrollbarBehavior* scrollbarBehavior() { re turn nullptr; } |
374 | 374 |
375 | 375 |
376 // Sudden Termination -------------------------------------------------- | 376 // Sudden Termination -------------------------------------------------- |
377 | 377 |
378 // Disable/Enable sudden termination on a process level. When possible, it | 378 // Disable/Enable sudden termination on a process level. When possible, it |
379 // is preferable to disable sudden termination on a per-frame level via | 379 // is preferable to disable sudden termination on a per-frame level via |
380 // WebFrameClient::suddenTerminationDisablerChanged. | 380 // WebFrameClient::suddenTerminationDisablerChanged. |
381 virtual void suddenTerminationChanged(bool enabled) { } | 381 BLINK_PLATFORM_HIDDEN virtual void suddenTerminationChanged(bool enabled) { } |
382 | 382 |
383 | 383 |
384 // System -------------------------------------------------------------- | 384 // System -------------------------------------------------------------- |
385 | 385 |
386 // Returns a value such as "en-US". | 386 // Returns a value such as "en-US". |
387 virtual WebString defaultLocale() { return WebString(); } | 387 BLINK_PLATFORM_HIDDEN virtual WebString defaultLocale() { return WebString() ; } |
388 | 388 |
389 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. | 389 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. |
390 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 390 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
391 | 391 |
392 // Returns an interface to the compositor thread. This can be null if the | 392 // Returns an interface to the compositor thread. This can be null if the |
393 // renderer was created with threaded rendering desabled. | 393 // renderer was created with threaded rendering desabled. |
394 virtual WebThread* compositorThread() const { return 0; } | 394 BLINK_PLATFORM_HIDDEN virtual WebThread* compositorThread() const { return 0 ; } |
395 | 395 |
396 // Vibration ----------------------------------------------------------- | 396 // Vibration ----------------------------------------------------------- |
397 | 397 |
398 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active | 398 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active |
399 // vibration it will be cancelled before the new one is started. | 399 // vibration it will be cancelled before the new one is started. |
400 virtual void vibrate(unsigned time) { } | 400 BLINK_PLATFORM_HIDDEN virtual void vibrate(unsigned time) { } |
401 | 401 |
402 // Cancels the current vibration, if there is one. | 402 // Cancels the current vibration, if there is one. |
403 virtual void cancelVibration() { } | 403 BLINK_PLATFORM_HIDDEN virtual void cancelVibration() { } |
404 | 404 |
405 | 405 |
406 // Testing ------------------------------------------------------------- | 406 // Testing ------------------------------------------------------------- |
407 | 407 |
408 // Get a pointer to testing support interfaces. Will not be available in pro duction builds. | 408 // Get a pointer to testing support interfaces. Will not be available in pro duction builds. |
409 virtual WebUnitTestSupport* unitTestSupport() { return nullptr; } | 409 BLINK_PLATFORM_HIDDEN virtual WebUnitTestSupport* unitTestSupport() { return nullptr; } |
410 | 410 |
411 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o rg/developers/design-documents/rappor. | 411 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o rg/developers/design-documents/rappor. |
412 // recordRappor records a sample string, while recordRapporURL records the d omain and registry of a url. | 412 // recordRappor records a sample string, while recordRapporURL records the d omain and registry of a url. |
413 virtual void recordRappor(const char* metric, const WebString& sample) { } | 413 BLINK_PLATFORM_HIDDEN virtual void recordRappor(const char* metric, const We bString& sample) { } |
414 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) { } | 414 BLINK_PLATFORM_HIDDEN virtual void recordRapporURL(const char* metric, const blink::WebURL& url) { } |
415 | 415 |
416 // Record a UMA sequence action. The UserMetricsAction construction must | 416 // Record a UMA sequence action. The UserMetricsAction construction must |
417 // be on a single line for extract_actions.py to find it. Please see | 417 // be on a single line for extract_actions.py to find it. Please see |
418 // that script for more details. Intended use is: | 418 // that script for more details. Intended use is: |
419 // recordAction(UserMetricsAction("MyAction")) | 419 // recordAction(UserMetricsAction("MyAction")) |
420 virtual void recordAction(const UserMetricsAction&) { } | 420 BLINK_PLATFORM_HIDDEN virtual void recordAction(const UserMetricsAction&) { } |
421 | 421 |
422 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump | 422 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump |
423 // method will be called on the same thread that called the | 423 // method will be called on the same thread that called the |
424 // registerMemoryDumpProvider() method. |name| is used for debugging | 424 // registerMemoryDumpProvider() method. |name| is used for debugging |
425 // (duplicates are allowed) and must be a long-lived C string. | 425 // (duplicates are allowed) and must be a long-lived C string. |
426 // See crbug.com/458295 for design docs. | 426 // See crbug.com/458295 for design docs. |
427 BLINK_PLATFORM_EXPORT virtual void registerMemoryDumpProvider(blink::WebMemo ryDumpProvider*, const char* name); | 427 BLINK_PLATFORM_EXPORT virtual void registerMemoryDumpProvider(blink::WebMemo ryDumpProvider*, const char* name); |
428 | 428 |
429 // Must be called on the thread that called registerMemoryDumpProvider(). | 429 // Must be called on the thread that called registerMemoryDumpProvider(). |
430 BLINK_PLATFORM_EXPORT virtual void unregisterMemoryDumpProvider(blink::WebMe moryDumpProvider*); | 430 BLINK_PLATFORM_EXPORT virtual void unregisterMemoryDumpProvider(blink::WebMe moryDumpProvider*); |
431 | 431 |
432 class TraceLogEnabledStateObserver { | 432 class BLINK_PLATFORM_HIDDEN TraceLogEnabledStateObserver { |
433 public: | 433 public: |
434 virtual ~TraceLogEnabledStateObserver() = default; | 434 virtual ~TraceLogEnabledStateObserver() = default; |
435 virtual void onTraceLogEnabled() = 0; | 435 virtual void onTraceLogEnabled() = 0; |
436 virtual void onTraceLogDisabled() = 0; | 436 virtual void onTraceLogDisabled() = 0; |
437 }; | 437 }; |
438 | 438 |
439 // Register or unregister a trace log state observer. Does not take ownershi p. | 439 // Register or unregister a trace log state observer. Does not take ownershi p. |
440 virtual void addTraceLogEnabledStateObserver(TraceLogEnabledStateObserver*) {} | 440 BLINK_PLATFORM_HIDDEN virtual void addTraceLogEnabledStateObserver(TraceLogE nabledStateObserver*) {} |
441 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {} | 441 BLINK_PLATFORM_HIDDEN virtual void removeTraceLogEnabledStateObserver(TraceL ogEnabledStateObserver*) {} |
442 | 442 |
443 typedef uint64_t WebMemoryAllocatorDumpGuid; | 443 typedef uint64_t WebMemoryAllocatorDumpGuid; |
444 | 444 |
445 // Returns guid corresponding to the given string (the hash value) for | 445 // Returns guid corresponding to the given string (the hash value) for |
446 // creating a WebMemoryAllocatorDump. | 446 // creating a WebMemoryAllocatorDump. |
447 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; } | 447 BLINK_PLATFORM_HIDDEN virtual WebMemoryAllocatorDumpGuid createWebMemoryAllo catorDumpGuid(const WebString& guidStr) { return 0; } |
448 | 448 |
449 // GPU ---------------------------------------------------------------- | 449 // GPU ---------------------------------------------------------------- |
450 // | 450 // |
451 // May return null if GPU is not supported. | 451 // May return null if GPU is not supported. |
452 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in stance. | 452 // Returns newly allocated and initialized offscreen WebGraphicsContext3D in stance. |
453 // Passing an existing context to shareContext will create the new context i n the same share group as the passed context. | 453 // Passing an existing context to shareContext will create the new context i n the same share group as the passed context. |
454 virtual WebGraphicsContext3D* createOffscreenGraphicsContext3D(const WebGrap hicsContext3D::Attributes&, WebGraphicsContext3D* shareContext) { return nullptr ; } | 454 BLINK_PLATFORM_HIDDEN virtual WebGraphicsContext3D* createOffscreenGraphicsC ontext3D(const WebGraphicsContext3D::Attributes&, WebGraphicsContext3D* shareCon text) { return nullptr; } |
455 virtual WebGraphicsContext3D* createOffscreenGraphicsContext3D(const WebGrap hicsContext3D::Attributes&, WebGraphicsContext3D* shareContext, WebGraphicsConte xt3D::WebGraphicsInfo* glInfo) { return nullptr; } | 455 BLINK_PLATFORM_HIDDEN virtual WebGraphicsContext3D* createOffscreenGraphicsC ontext3D(const WebGraphicsContext3D::Attributes&, WebGraphicsContext3D* shareCon text, WebGraphicsContext3D::WebGraphicsInfo* glInfo) { return nullptr; } |
456 virtual WebGraphicsContext3D* createOffscreenGraphicsContext3D(const WebGrap hicsContext3D::Attributes&) { return nullptr; } | 456 BLINK_PLATFORM_HIDDEN virtual WebGraphicsContext3D* createOffscreenGraphicsC ontext3D(const WebGraphicsContext3D::Attributes&) { return nullptr; } |
457 | 457 |
458 // Returns a newly allocated and initialized offscreen context provider. The provider may return a null | 458 // Returns a newly allocated and initialized offscreen context provider. The provider may return a null |
459 // graphics context if GPU is not supported. | 459 // graphics context if GPU is not supported. |
460 virtual WebGraphicsContext3DProvider* createSharedOffscreenGraphicsContext3D Provider() { return nullptr; } | 460 BLINK_PLATFORM_HIDDEN virtual WebGraphicsContext3DProvider* createSharedOffs creenGraphicsContext3DProvider() { return nullptr; } |
461 | 461 |
462 // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas. | 462 // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas. |
463 // This will return false if the platform cannot promise that contexts will be preserved across operations like | 463 // This will return false if the platform cannot promise that contexts will be preserved across operations like |
464 // locking the screen or if the platform cannot provide a context with suita ble performance characteristics. | 464 // locking the screen or if the platform cannot provide a context with suita ble performance characteristics. |
465 // | 465 // |
466 // This value must be checked again after a context loss event as the platfo rm's capabilities may have changed. | 466 // This value must be checked again after a context loss event as the platfo rm's capabilities may have changed. |
467 virtual bool canAccelerate2dCanvas() { return false; } | 467 BLINK_PLATFORM_HIDDEN virtual bool canAccelerate2dCanvas() { return false; } |
468 | 468 |
469 virtual bool isThreadedCompositingEnabled() { return false; } | 469 BLINK_PLATFORM_HIDDEN virtual bool isThreadedCompositingEnabled() { return f alse; } |
470 virtual bool isThreadedAnimationEnabled() { return true; } | 470 BLINK_PLATFORM_HIDDEN virtual bool isThreadedAnimationEnabled() { return tru e; } |
471 | 471 |
472 virtual WebCompositorSupport* compositorSupport() { return nullptr; } | 472 BLINK_PLATFORM_HIDDEN virtual WebCompositorSupport* compositorSupport() { re turn nullptr; } |
473 | 473 |
474 virtual WebFlingAnimator* createFlingAnimator() { return nullptr; } | 474 BLINK_PLATFORM_HIDDEN virtual WebFlingAnimator* createFlingAnimator() { retu rn nullptr; } |
475 | 475 |
476 // Creates a new fling animation curve instance for device |deviceSource| | 476 // Creates a new fling animation curve instance for device |deviceSource| |
477 // with |velocity| and already scrolled |cumulativeScroll| pixels. | 477 // with |velocity| and already scrolled |cumulativeScroll| pixels. |
478 virtual WebGestureCurve* createFlingAnimationCurve(WebGestureDevice deviceSo urce, const WebFloatPoint& velocity, const WebSize& cumulativeScroll) { return n ullptr; } | 478 BLINK_PLATFORM_HIDDEN virtual WebGestureCurve* createFlingAnimationCurve(Web GestureDevice deviceSource, const WebFloatPoint& velocity, const WebSize& cumula tiveScroll) { return nullptr; } |
479 | 479 |
480 // WebRTC ---------------------------------------------------------- | 480 // WebRTC ---------------------------------------------------------- |
481 | 481 |
482 // Creates an WebRTCPeerConnectionHandler for RTCPeerConnection. | 482 // Creates an WebRTCPeerConnectionHandler for RTCPeerConnection. |
483 // May return null if WebRTC functionality is not avaliable or if it's out o f resources. | 483 // May return null if WebRTC functionality is not avaliable or if it's out o f resources. |
484 virtual WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebRTCPe erConnectionHandlerClient*) { return nullptr; } | 484 BLINK_PLATFORM_HIDDEN virtual WebRTCPeerConnectionHandler* createRTCPeerConn ectionHandler(WebRTCPeerConnectionHandlerClient*) { return nullptr; } |
485 | 485 |
486 // Creates an WebMediaRecorderHandler to record MediaStreams. | 486 // Creates an WebMediaRecorderHandler to record MediaStreams. |
487 // May return null if the functionality is not available or out of resources . | 487 // May return null if the functionality is not available or out of resources . |
488 virtual WebMediaRecorderHandler* createMediaRecorderHandler() { return nullp tr; } | 488 BLINK_PLATFORM_HIDDEN virtual WebMediaRecorderHandler* createMediaRecorderHa ndler() { return nullptr; } |
489 | 489 |
490 // May return null if WebRTC functionality is not available or out of resour ces. | 490 // May return null if WebRTC functionality is not available or out of resour ces. |
491 virtual WebRTCCertificateGenerator* createRTCCertificateGenerator() { return nullptr; } | 491 BLINK_PLATFORM_HIDDEN virtual WebRTCCertificateGenerator* createRTCCertifica teGenerator() { return nullptr; } |
492 | 492 |
493 // May return null if WebRTC functionality is not available or out of resour ces. | 493 // May return null if WebRTC functionality is not available or out of resour ces. |
494 virtual WebMediaStreamCenter* createMediaStreamCenter(WebMediaStreamCenterCl ient*) { return nullptr; } | 494 BLINK_PLATFORM_HIDDEN virtual WebMediaStreamCenter* createMediaStreamCenter( WebMediaStreamCenterClient*) { return nullptr; } |
495 | 495 |
496 // Creates an WebCanvasCaptureHandler to capture Canvas output. | 496 // Creates an WebCanvasCaptureHandler to capture Canvas output. |
497 virtual WebCanvasCaptureHandler* createCanvasCaptureHandler(const WebSize&, double, WebMediaStreamTrack*) { return nullptr; } | 497 BLINK_PLATFORM_HIDDEN virtual WebCanvasCaptureHandler* createCanvasCaptureHa ndler(const WebSize&, double, WebMediaStreamTrack*) { return nullptr; } |
498 | 498 |
499 // Fills in the WebMediaStream to capture from the WebMediaPlayer identified | 499 // Fills in the WebMediaStream to capture from the WebMediaPlayer identified |
500 // by the second parameter. | 500 // by the second parameter. |
501 virtual void createHTMLVideoElementCapturer(WebMediaStream*, WebMediaPlayer* ) {} | 501 BLINK_PLATFORM_HIDDEN virtual void createHTMLVideoElementCapturer(WebMediaSt ream*, WebMediaPlayer*) {} |
502 | 502 |
503 // WebWorker ---------------------------------------------------------- | 503 // WebWorker ---------------------------------------------------------- |
504 | 504 |
505 virtual void didStartWorkerThread() { } | 505 BLINK_PLATFORM_HIDDEN virtual void didStartWorkerThread() { } |
506 virtual void willStopWorkerThread() { } | 506 BLINK_PLATFORM_HIDDEN virtual void willStopWorkerThread() { } |
507 | 507 |
508 // WebCrypto ---------------------------------------------------------- | 508 // WebCrypto ---------------------------------------------------------- |
509 | 509 |
510 virtual WebCrypto* crypto() { return nullptr; } | 510 BLINK_PLATFORM_HIDDEN virtual WebCrypto* crypto() { return nullptr; } |
511 | 511 |
512 | 512 |
513 // Platform events ----------------------------------------------------- | 513 // Platform events ----------------------------------------------------- |
514 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. | 514 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. |
515 | 515 |
516 // Connects the mojo handle to the remote service provider. | 516 // Connects the mojo handle to the remote service provider. |
517 template <typename Interface> | 517 template <typename Interface> |
518 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr) | 518 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr) |
519 { | 519 { |
520 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe()); | 520 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe()); |
521 } | 521 } |
522 virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePip eHandle handle) { } | 522 BLINK_PLATFORM_HIDDEN virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePipeHandle handle) { } |
523 | 523 |
524 // Request the platform to start listening to the events of the specified | 524 // Request the platform to start listening to the events of the specified |
525 // type and notify the given listener (if not null) when there is an update. | 525 // type and notify the given listener (if not null) when there is an update. |
526 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { } | 526 BLINK_PLATFORM_HIDDEN virtual void startListening(WebPlatformEventType type, WebPlatformEventListener* listener) { } |
527 | 527 |
528 // Request the platform to stop listening to the specified event and no | 528 // Request the platform to stop listening to the specified event and no |
529 // longer notify the listener, if any. | 529 // longer notify the listener, if any. |
530 virtual void stopListening(WebPlatformEventType type) { } | 530 BLINK_PLATFORM_HIDDEN virtual void stopListening(WebPlatformEventType type) { } |
531 | 531 |
532 // This method converts from the supplied DOM code enum to the | 532 // This method converts from the supplied DOM code enum to the |
533 // embedder's DOM code value for the key pressed. |domCode| values are | 533 // embedder's DOM code value for the key pressed. |domCode| values are |
534 // based on the value defined in ui/events/keycodes/dom4/keycode_converter_d ata.h. | 534 // based on the value defined in ui/events/keycodes/dom4/keycode_converter_d ata.h. |
535 // Returns null string, if DOM code value is not found. | 535 // Returns null string, if DOM code value is not found. |
536 virtual WebString domCodeStringFromEnum(int domCode) { return WebString(); } | 536 BLINK_PLATFORM_HIDDEN virtual WebString domCodeStringFromEnum(int domCode) { return WebString(); } |
537 | 537 |
538 // This method converts from the suppled DOM code value to the | 538 // This method converts from the suppled DOM code value to the |
539 // embedder's DOM code enum for the key pressed. |codeString| is defined in | 539 // embedder's DOM code enum for the key pressed. |codeString| is defined in |
540 // ui/events/keycodes/dom4/keycode_converter_data.h. | 540 // ui/events/keycodes/dom4/keycode_converter_data.h. |
541 // Returns 0, if DOM code enum is not found. | 541 // Returns 0, if DOM code enum is not found. |
542 virtual int domEnumFromCodeString(const WebString& codeString) { return 0; } | 542 BLINK_PLATFORM_HIDDEN virtual int domEnumFromCodeString(const WebString& cod eString) { return 0; } |
543 | 543 |
544 // This method converts from the supplied DOM |key| enum to the | 544 // This method converts from the supplied DOM |key| enum to the |
545 // corresponding DOM |key| string value for the key pressed. |domKey| values are | 545 // corresponding DOM |key| string value for the key pressed. |domKey| values are |
546 // based on the value defined in ui/events/keycodes/dom3/dom_key_data.h. | 546 // based on the value defined in ui/events/keycodes/dom3/dom_key_data.h. |
547 // Returns empty string, if DOM key value is not found. | 547 // Returns empty string, if DOM key value is not found. |
548 virtual WebString domKeyStringFromEnum(int domKey) { return WebString(); } | 548 BLINK_PLATFORM_HIDDEN virtual WebString domKeyStringFromEnum(int domKey) { r eturn WebString(); } |
549 | 549 |
550 // This method converts from the suppled DOM |key| value to the | 550 // This method converts from the suppled DOM |key| value to the |
551 // embedder's DOM |key| enum for the key pressed. |keyString| is defined in | 551 // embedder's DOM |key| enum for the key pressed. |keyString| is defined in |
552 // ui/events/keycodes/dom3/dom_key_data.h. | 552 // ui/events/keycodes/dom3/dom_key_data.h. |
553 // Returns 0 if DOM key enum is not found. | 553 // Returns 0 if DOM key enum is not found. |
554 virtual int domKeyEnumFromString(const WebString& keyString) { return 0; } | 554 BLINK_PLATFORM_HIDDEN virtual int domKeyEnumFromString(const WebString& keyS tring) { return 0; } |
555 | 555 |
556 // Quota ----------------------------------------------------------- | 556 // Quota ----------------------------------------------------------- |
557 | 557 |
558 // Queries the storage partition's storage usage and quota information. | 558 // Queries the storage partition's storage usage and quota information. |
559 // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called | 559 // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called |
560 // with the current usage and quota information for the partition. When | 560 // with the current usage and quota information for the partition. When |
561 // an error occurs WebStorageQuotaCallbacks::didFail is called with an | 561 // an error occurs WebStorageQuotaCallbacks::didFail is called with an |
562 // error code. | 562 // error code. |
563 virtual void queryStorageUsageAndQuota( | 563 BLINK_PLATFORM_HIDDEN virtual void queryStorageUsageAndQuota( |
564 const WebURL& storagePartition, | 564 const WebURL& storagePartition, |
565 WebStorageQuotaType, | 565 WebStorageQuotaType, |
566 WebStorageQuotaCallbacks) { } | 566 WebStorageQuotaCallbacks) { } |
567 | 567 |
568 | 568 |
569 // WebDatabase -------------------------------------------------------- | 569 // WebDatabase -------------------------------------------------------- |
570 | 570 |
571 virtual WebDatabaseObserver* databaseObserver() { return nullptr; } | 571 BLINK_PLATFORM_HIDDEN virtual WebDatabaseObserver* databaseObserver() { retu rn nullptr; } |
572 | 572 |
573 | 573 |
574 // Web Notifications -------------------------------------------------- | 574 // Web Notifications -------------------------------------------------- |
575 | 575 |
576 virtual WebNotificationManager* notificationManager() { return nullptr; } | 576 BLINK_PLATFORM_HIDDEN virtual WebNotificationManager* notificationManager() { return nullptr; } |
577 | 577 |
578 | 578 |
579 // Geofencing --------------------------------------------------------- | 579 // Geofencing --------------------------------------------------------- |
580 | 580 |
581 virtual WebGeofencingProvider* geofencingProvider() { return nullptr; } | 581 BLINK_PLATFORM_HIDDEN virtual WebGeofencingProvider* geofencingProvider() { return nullptr; } |
582 | 582 |
583 | 583 |
584 // Push API------------------------------------------------------------ | 584 // Push API------------------------------------------------------------ |
585 | 585 |
586 virtual WebPushProvider* pushProvider() { return nullptr; } | 586 BLINK_PLATFORM_HIDDEN virtual WebPushProvider* pushProvider() { return nullp tr; } |
587 | 587 |
588 | 588 |
589 // navigator.connect -------------------------------------------------- | 589 // navigator.connect -------------------------------------------------- |
590 | 590 |
591 virtual WebNavigatorConnectProvider* navigatorConnectProvider() { return nul lptr; } | 591 BLINK_PLATFORM_HIDDEN virtual WebNavigatorConnectProvider* navigatorConnectP rovider() { return nullptr; } |
592 | 592 |
593 // Returns pointer to a new blink owned WebServicePortProvider instance, | 593 // Returns pointer to a new blink owned WebServicePortProvider instance, |
594 // associated with a particular ServicePortCollection (identified by the | 594 // associated with a particular ServicePortCollection (identified by the |
595 // WebServicePortProviderClient passed in). | 595 // WebServicePortProviderClient passed in). |
596 virtual WebServicePortProvider* createServicePortProvider(WebServicePortProv iderClient*) { return nullptr; } | 596 BLINK_PLATFORM_HIDDEN virtual WebServicePortProvider* createServicePortProvi der(WebServicePortProviderClient*) { return nullptr; } |
597 | 597 |
598 // Permissions -------------------------------------------------------- | 598 // Permissions -------------------------------------------------------- |
599 | 599 |
600 virtual WebPermissionClient* permissionClient() { return nullptr; } | 600 BLINK_PLATFORM_HIDDEN virtual WebPermissionClient* permissionClient() { retu rn nullptr; } |
601 | 601 |
602 | 602 |
603 // Background Sync API------------------------------------------------------ ------ | 603 // Background Sync API------------------------------------------------------ ------ |
604 | 604 |
605 virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; } | 605 BLINK_PLATFORM_HIDDEN virtual WebSyncProvider* backgroundSyncProvider() { re turn nullptr; } |
606 | 606 |
607 // Experimental Framework ---------------------------------------------- | 607 // Experimental Framework ---------------------------------------------- |
608 | 608 |
609 virtual WebTrialTokenValidator* trialTokenValidator() { return nullptr; } | 609 BLINK_PLATFORM_HIDDEN virtual WebTrialTokenValidator* trialTokenValidator() { return nullptr; } |
610 | 610 |
611 protected: | 611 protected: |
612 BLINK_PLATFORM_EXPORT Platform(); | 612 BLINK_PLATFORM_EXPORT Platform(); |
613 virtual ~Platform() { } | 613 BLINK_PLATFORM_HIDDEN virtual ~Platform() { } |
614 | 614 |
615 WebThread* m_mainThread; | 615 WebThread* m_mainThread; |
616 }; | 616 }; |
617 | 617 |
618 } // namespace blink | 618 } // namespace blink |
619 | 619 |
620 #endif | 620 #endif |
OLD | NEW |