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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 virtual double currentTime() { return 0; } | 418 virtual double currentTime() { return 0; } |
419 | 419 |
420 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. | 420 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. |
421 // This function is expected to return at least millisecond-precision values
. For this reason, | 421 // This function is expected to return at least millisecond-precision values
. For this reason, |
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 // WebKit clients must implement this funcion if they use cryptographic rand
omness. | 425 // WebKit clients must implement this funcion if they use cryptographic rand
omness. |
426 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; | 426 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; |
427 | 427 |
428 // Delayed work is driven by a shared timer. | |
429 typedef void (*SharedTimerFunction)(); | |
430 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
{ } | |
431 virtual void setSharedTimerFireInterval(double) { } | |
432 virtual void stopSharedTimer() { } | |
433 | |
434 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. | 428 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. |
435 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 429 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
436 | 430 |
437 // Vibration ----------------------------------------------------------- | 431 // Vibration ----------------------------------------------------------- |
438 | 432 |
439 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 433 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
440 // vibration it will be cancelled before the new one is started. | 434 // vibration it will be cancelled before the new one is started. |
441 virtual void vibrate(unsigned time) { } | 435 virtual void vibrate(unsigned time) { } |
442 | 436 |
443 // Cancels the current vibration, if there is one. | 437 // Cancels the current vibration, if there is one. |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 protected: | 680 protected: |
687 BLINK_PLATFORM_EXPORT Platform(); | 681 BLINK_PLATFORM_EXPORT Platform(); |
688 virtual ~Platform() { } | 682 virtual ~Platform() { } |
689 | 683 |
690 WebThread* m_mainThread; | 684 WebThread* m_mainThread; |
691 }; | 685 }; |
692 | 686 |
693 } // namespace blink | 687 } // namespace blink |
694 | 688 |
695 #endif | 689 #endif |
OLD | NEW |