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

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

Issue 1151633004: Revert of Implement timers by posting delayed tasks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/tests/TextFinderTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // it is recommended that the fixed point be no further in the past than the epoch. 421 // it is recommended that the fixed point be no further in the past than the epoch.
422 virtual double monotonicallyIncreasingTime() { return 0; } 422 virtual double monotonicallyIncreasingTime() { return 0; }
423 423
424 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be 424 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be
425 // synchronized with ftrace timestamps. 425 // synchronized with ftrace timestamps.
426 virtual double systemTraceTime() { return 0; } 426 virtual double systemTraceTime() { return 0; }
427 427
428 // WebKit clients must implement this funcion if they use cryptographic rand omness. 428 // WebKit clients must implement this funcion if they use cryptographic rand omness.
429 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0; 429 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0;
430 430
431 // Delayed work is driven by a shared timer.
432 typedef void (*SharedTimerFunction)();
433 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction) { }
434 virtual void setSharedTimerFireInterval(double) { }
435 virtual void stopSharedTimer() { }
436
431 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. 437 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop.
432 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; 438 BLINK_PLATFORM_EXPORT WebThread* mainThread() const;
433 439
434 // Vibration ----------------------------------------------------------- 440 // Vibration -----------------------------------------------------------
435 441
436 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active 442 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active
437 // vibration it will be cancelled before the new one is started. 443 // vibration it will be cancelled before the new one is started.
438 virtual void vibrate(unsigned time) { } 444 virtual void vibrate(unsigned time) { }
439 445
440 // Cancels the current vibration, if there is one. 446 // Cancels the current vibration, if there is one.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 protected: 714 protected:
709 BLINK_PLATFORM_EXPORT Platform(); 715 BLINK_PLATFORM_EXPORT Platform();
710 virtual ~Platform() { } 716 virtual ~Platform() { }
711 717
712 WebThread* m_mainThread; 718 WebThread* m_mainThread;
713 }; 719 };
714 720
715 } // namespace blink 721 } // namespace blink
716 722
717 #endif 723 #endif
OLDNEW
« no previous file with comments | « Source/web/tests/TextFinderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698