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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 virtual WebString defaultLocale() { return WebString(); } | 419 virtual WebString defaultLocale() { return WebString(); } |
420 | 420 |
421 // Wall clock time in seconds since the epoch. | 421 // Wall clock time in seconds since the epoch. |
422 virtual double currentTimeSeconds() { return 0; } | 422 virtual double currentTimeSeconds() { return 0; } |
423 | 423 |
424 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. | 424 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. |
425 // This function is expected to return at least millisecond-precision values
. For this reason, | 425 // This function is expected to return at least millisecond-precision values
. For this reason, |
426 // it is recommended that the fixed point be no further in the past than the
epoch. | 426 // it is recommended that the fixed point be no further in the past than the
epoch. |
427 virtual double monotonicallyIncreasingTimeSeconds() { return 0; } | 427 virtual double monotonicallyIncreasingTimeSeconds() { return 0; } |
428 | 428 |
| 429 // Virtual time is used by Headless Chrome for determinism and performance (
fast forwarding |
| 430 // of timers). New code should typically use |currentTimeSeconds| and |
| 431 // |monotonicallyIncreasingTimeSeconds| as normal. |
| 432 virtual double virtualTimeSeconds() { return 0; } |
| 433 virtual double monotonicallyIncreasingVirtualTimeSeconds() { return 0; } |
| 434 |
429 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. | 435 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. |
430 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 436 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
431 | 437 |
432 // Returns an interface to the compositor thread. This can be null if the | 438 // Returns an interface to the compositor thread. This can be null if the |
433 // renderer was created with threaded rendering desabled. | 439 // renderer was created with threaded rendering desabled. |
434 virtual WebThread* compositorThread() const { return 0; } | 440 virtual WebThread* compositorThread() const { return 0; } |
435 | 441 |
436 // Vibration ----------------------------------------------------------- | 442 // Vibration ----------------------------------------------------------- |
437 | 443 |
438 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 444 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 protected: | 654 protected: |
649 BLINK_PLATFORM_EXPORT Platform(); | 655 BLINK_PLATFORM_EXPORT Platform(); |
650 virtual ~Platform() { } | 656 virtual ~Platform() { } |
651 | 657 |
652 WebThread* m_mainThread; | 658 WebThread* m_mainThread; |
653 }; | 659 }; |
654 | 660 |
655 } // namespace blink | 661 } // namespace blink |
656 | 662 |
657 #endif | 663 #endif |
OLD | NEW |