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

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

Issue 1550563002: Blink Platform: Remove time functions from Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // is preferable to disable sudden termination on a per-frame level via 411 // is preferable to disable sudden termination on a per-frame level via
412 // WebFrameClient::suddenTerminationDisablerChanged. 412 // WebFrameClient::suddenTerminationDisablerChanged.
413 virtual void suddenTerminationChanged(bool enabled) { } 413 virtual void suddenTerminationChanged(bool enabled) { }
414 414
415 415
416 // System -------------------------------------------------------------- 416 // System --------------------------------------------------------------
417 417
418 // Returns a value such as "en-US". 418 // Returns a value such as "en-US".
419 virtual WebString defaultLocale() { return WebString(); } 419 virtual WebString defaultLocale() { return WebString(); }
420 420
421 // Wall clock time in seconds since the epoch.
422 virtual double currentTimeSeconds() { return 0; }
423
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,
426 // it is recommended that the fixed point be no further in the past than the epoch.
427 virtual double monotonicallyIncreasingTimeSeconds() { return 0; }
428
429 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be
430 // synchronized with ftrace timestamps.
431 virtual double systemTraceTime() { return 0; }
432
433 // WebKit clients must implement this funcion if they use cryptographic rand omness. 421 // WebKit clients must implement this funcion if they use cryptographic rand omness.
434 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0; 422 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0;
435 423
436 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. 424 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop.
437 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; 425 BLINK_PLATFORM_EXPORT WebThread* mainThread() const;
438 426
439 // Returns an interface to the compositor thread. This can be null if the 427 // Returns an interface to the compositor thread. This can be null if the
440 // renderer was created with threaded rendering desabled. 428 // renderer was created with threaded rendering desabled.
441 virtual WebThread* compositorThread() const { return 0; } 429 virtual WebThread* compositorThread() const { return 0; }
442 430
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 protected: 735 protected:
748 BLINK_PLATFORM_EXPORT Platform(); 736 BLINK_PLATFORM_EXPORT Platform();
749 virtual ~Platform() { } 737 virtual ~Platform() { }
750 738
751 WebThread* m_mainThread; 739 WebThread* m_mainThread;
752 }; 740 };
753 741
754 } // namespace blink 742 } // namespace blink
755 743
756 #endif 744 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698