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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // it is recommended that the fixed point be no further in the past than the
epoch. | 422 // it is recommended that the fixed point be no further in the past than the
epoch. |
423 virtual double monotonicallyIncreasingTime() { return 0; } | 423 virtual double monotonicallyIncreasingTime() { return 0; } |
424 | 424 |
425 // System trace time in seconds. For example, on Chrome OS, this timestamp s
hould be | 425 // System trace time in seconds. For example, on Chrome OS, this timestamp s
hould be |
426 // synchronized with ftrace timestamps. | 426 // synchronized with ftrace timestamps. |
427 virtual double systemTraceTime() { return 0; } | 427 virtual double systemTraceTime() { return 0; } |
428 | 428 |
429 // WebKit clients must implement this funcion if they use cryptographic rand
omness. | 429 // WebKit clients must implement this funcion if they use cryptographic rand
omness. |
430 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; | 430 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; |
431 | 431 |
| 432 // Delayed work is driven by a shared timer. |
| 433 typedef void (*SharedTimerFunction)(); |
| 434 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
{ } |
| 435 virtual void setSharedTimerFireInterval(double) { } |
| 436 virtual void stopSharedTimer() { } |
| 437 |
432 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. | 438 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. |
433 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 439 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
434 | 440 |
435 // Vibration ----------------------------------------------------------- | 441 // Vibration ----------------------------------------------------------- |
436 | 442 |
437 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 443 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
438 // vibration it will be cancelled before the new one is started. | 444 // vibration it will be cancelled before the new one is started. |
439 virtual void vibrate(unsigned time) { } | 445 virtual void vibrate(unsigned time) { } |
440 | 446 |
441 // Cancels the current vibration, if there is one. | 447 // Cancels the current vibration, if there is one. |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 protected: | 718 protected: |
713 BLINK_PLATFORM_EXPORT Platform(); | 719 BLINK_PLATFORM_EXPORT Platform(); |
714 virtual ~Platform() { } | 720 virtual ~Platform() { } |
715 | 721 |
716 WebThread* m_mainThread; | 722 WebThread* m_mainThread; |
717 }; | 723 }; |
718 | 724 |
719 } // namespace blink | 725 } // namespace blink |
720 | 726 |
721 #endif | 727 #endif |
OLD | NEW |