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 | |
438 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. | 432 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. |
439 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 433 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
440 | 434 |
441 // Vibration ----------------------------------------------------------- | 435 // Vibration ----------------------------------------------------------- |
442 | 436 |
443 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 437 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
444 // vibration it will be cancelled before the new one is started. | 438 // vibration it will be cancelled before the new one is started. |
445 virtual void vibrate(unsigned time) { } | 439 virtual void vibrate(unsigned time) { } |
446 | 440 |
447 // Cancels the current vibration, if there is one. | 441 // Cancels the current vibration, if there is one. |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 protected: | 712 protected: |
719 BLINK_PLATFORM_EXPORT Platform(); | 713 BLINK_PLATFORM_EXPORT Platform(); |
720 virtual ~Platform() { } | 714 virtual ~Platform() { } |
721 | 715 |
722 WebThread* m_mainThread; | 716 WebThread* m_mainThread; |
723 }; | 717 }; |
724 | 718 |
725 } // namespace blink | 719 } // namespace blink |
726 | 720 |
727 #endif | 721 #endif |
OLD | NEW |