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