Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: public/platform/Platform.h

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Now uses the WebThread's WebScheduler Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« Source/platform/Timer.cpp ('K') | « Source/web/tests/TextFinderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698