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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef Platform_h | 31 #ifndef Platform_h |
32 #define Platform_h | 32 #define Platform_h |
33 | 33 |
34 #ifdef WIN32 | 34 #ifdef WIN32 |
35 #include <windows.h> | 35 #include <windows.h> |
36 #endif | 36 #endif |
37 | 37 |
| 38 #include "BlameContext.h" |
38 #include "UserMetricsAction.h" | 39 #include "UserMetricsAction.h" |
39 #include "WebAudioDevice.h" | 40 #include "WebAudioDevice.h" |
40 #include "WebCommon.h" | 41 #include "WebCommon.h" |
41 #include "WebData.h" | 42 #include "WebData.h" |
42 #include "WebDeviceLightListener.h" | 43 #include "WebDeviceLightListener.h" |
43 #include "WebGamepadListener.h" | 44 #include "WebGamepadListener.h" |
44 #include "WebGamepads.h" | 45 #include "WebGamepads.h" |
45 #include "WebGestureDevice.h" | 46 #include "WebGestureDevice.h" |
46 #include "WebGraphicsContext3D.h" | 47 #include "WebGraphicsContext3D.h" |
47 #include "WebLocalizedString.h" | 48 #include "WebLocalizedString.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 352 |
352 // Threads ------------------------------------------------------- | 353 // Threads ------------------------------------------------------- |
353 | 354 |
354 // Creates an embedder-defined thread. | 355 // Creates an embedder-defined thread. |
355 virtual WebThread* createThread(const char* name) { return nullptr; } | 356 virtual WebThread* createThread(const char* name) { return nullptr; } |
356 | 357 |
357 // Returns an interface to the current thread. This is owned by the | 358 // Returns an interface to the current thread. This is owned by the |
358 // embedder. | 359 // embedder. |
359 virtual WebThread* currentThread() { return nullptr; } | 360 virtual WebThread* currentThread() { return nullptr; } |
360 | 361 |
| 362 // Returns a blame context for attributing top-level work which does not |
| 363 // belong to a particular frame scope. |
| 364 virtual BlameContext* topLevelBlameContext() { return nullptr; } |
| 365 |
361 // Resources ----------------------------------------------------------- | 366 // Resources ----------------------------------------------------------- |
362 | 367 |
363 // Returns a blob of data corresponding to the named resource. | 368 // Returns a blob of data corresponding to the named resource. |
364 virtual WebData loadResource(const char* name) { return WebData(); } | 369 virtual WebData loadResource(const char* name) { return WebData(); } |
365 | 370 |
366 // Decodes the in-memory audio file data and returns the linear PCM audio da
ta in the destinationBus. | 371 // Decodes the in-memory audio file data and returns the linear PCM audio da
ta in the destinationBus. |
367 // A sample-rate conversion to sampleRate will occur if the file data is at
a different sample-rate. | 372 // A sample-rate conversion to sampleRate will occur if the file data is at
a different sample-rate. |
368 // Returns true on success. | 373 // Returns true on success. |
369 virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audi
oFileData, size_t dataSize) { return false; } | 374 virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audi
oFileData, size_t dataSize) { return false; } |
370 | 375 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 protected: | 638 protected: |
634 Platform(); | 639 Platform(); |
635 virtual ~Platform() { } | 640 virtual ~Platform() { } |
636 | 641 |
637 WebThread* m_mainThread; | 642 WebThread* m_mainThread; |
638 }; | 643 }; |
639 | 644 |
640 } // namespace blink | 645 } // namespace blink |
641 | 646 |
642 #endif | 647 #endif |
OLD | NEW |