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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 virtual double currentTime() { return 0; } | 436 virtual double currentTime() { return 0; } |
437 | 437 |
438 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. | 438 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. |
439 // This function is expected to return at least millisecond-precision values
. For this reason, | 439 // This function is expected to return at least millisecond-precision values
. For this reason, |
440 // it is recommended that the fixed point be no further in the past than the
epoch. | 440 // it is recommended that the fixed point be no further in the past than the
epoch. |
441 virtual double monotonicallyIncreasingTime() { return 0; } | 441 virtual double monotonicallyIncreasingTime() { return 0; } |
442 | 442 |
443 // WebKit clients must implement this funcion if they use cryptographic rand
omness. | 443 // WebKit clients must implement this funcion if they use cryptographic rand
omness. |
444 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; | 444 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; |
445 | 445 |
446 // Delayed work is driven by a shared timer. | |
447 typedef void (*SharedTimerFunction)(); | |
448 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
{ } | |
449 virtual void setSharedTimerFireInterval(double) { } | |
450 virtual void stopSharedTimer() { } | |
451 | |
452 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. | 446 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. |
453 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 447 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
454 | 448 |
455 // Vibration ----------------------------------------------------------- | 449 // Vibration ----------------------------------------------------------- |
456 | 450 |
457 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 451 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
458 // vibration it will be cancelled before the new one is started. | 452 // vibration it will be cancelled before the new one is started. |
459 virtual void vibrate(unsigned time) { } | 453 virtual void vibrate(unsigned time) { } |
460 | 454 |
461 // Cancels the current vibration, if there is one. | 455 // Cancels the current vibration, if there is one. |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 protected: | 695 protected: |
702 BLINK_PLATFORM_EXPORT Platform(); | 696 BLINK_PLATFORM_EXPORT Platform(); |
703 virtual ~Platform() { } | 697 virtual ~Platform() { } |
704 | 698 |
705 WebThread* m_mainThread; | 699 WebThread* m_mainThread; |
706 }; | 700 }; |
707 | 701 |
708 } // namespace blink | 702 } // namespace blink |
709 | 703 |
710 #endif | 704 #endif |
OLD | NEW |