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