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

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

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 // WebFrameClient::suddenTerminationDisablerChanged. 419 // WebFrameClient::suddenTerminationDisablerChanged.
420 virtual void suddenTerminationChanged(bool enabled) { } 420 virtual void suddenTerminationChanged(bool enabled) { }
421 421
422 422
423 // System -------------------------------------------------------------- 423 // System --------------------------------------------------------------
424 424
425 // Returns a value such as "en-US". 425 // Returns a value such as "en-US".
426 virtual WebString defaultLocale() { return WebString(); } 426 virtual WebString defaultLocale() { return WebString(); }
427 427
428 // Wall clock time in seconds since the epoch. 428 // Wall clock time in seconds since the epoch.
429 virtual double currentTime() { return 0; } 429 virtual double currentTimeSeconds() { return 0; }
430 430
431 // Monotonically increasing time in seconds from an arbitrary fixed point in the past. 431 // Monotonically increasing time in seconds from an arbitrary fixed point in the past.
432 // This function is expected to return at least millisecond-precision values . For this reason, 432 // This function is expected to return at least millisecond-precision values . For this reason,
433 // it is recommended that the fixed point be no further in the past than the epoch. 433 // it is recommended that the fixed point be no further in the past than the epoch.
434 virtual double monotonicallyIncreasingTime() { return 0; } 434 virtual double monotonicallyIncreasingTimeSeconds() { return 0; }
435 435
436 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be 436 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be
437 // synchronized with ftrace timestamps. 437 // synchronized with ftrace timestamps.
438 virtual double systemTraceTime() { return 0; } 438 virtual double systemTraceTime() { return 0; }
439 439
440 // WebKit clients must implement this funcion if they use cryptographic rand omness. 440 // WebKit clients must implement this funcion if they use cryptographic rand omness.
441 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0; 441 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0;
442 442
443 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. 443 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop.
444 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; 444 BLINK_PLATFORM_EXPORT WebThread* mainThread() const;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 protected: 737 protected:
738 BLINK_PLATFORM_EXPORT Platform(); 738 BLINK_PLATFORM_EXPORT Platform();
739 virtual ~Platform() { } 739 virtual ~Platform() { }
740 740
741 WebThread* m_mainThread; 741 WebThread* m_mainThread;
742 }; 742 };
743 743
744 } // namespace blink 744 } // namespace blink
745 745
746 #endif 746 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/TextFinderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698