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

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: Merge again. Created 4 years, 10 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // is preferable to disable sudden termination on a per-frame level via 392 // is preferable to disable sudden termination on a per-frame level via
393 // WebFrameClient::suddenTerminationDisablerChanged. 393 // WebFrameClient::suddenTerminationDisablerChanged.
394 virtual void suddenTerminationChanged(bool enabled) { } 394 virtual void suddenTerminationChanged(bool enabled) { }
395 395
396 396
397 // System -------------------------------------------------------------- 397 // System --------------------------------------------------------------
398 398
399 // Returns a value such as "en-US". 399 // Returns a value such as "en-US".
400 virtual WebString defaultLocale() { return WebString(); } 400 virtual WebString defaultLocale() { return WebString(); }
401 401
402 // Wall clock time in seconds since the epoch.
403 virtual double currentTimeSeconds() { return 0; }
404
405 // Monotonically increasing time in seconds from an arbitrary fixed point in the past.
406 // This function is expected to return at least millisecond-precision values . For this reason,
407 // it is recommended that the fixed point be no further in the past than the epoch.
408 virtual double monotonicallyIncreasingTimeSeconds() { return 0; }
409
410 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. 402 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop.
411 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; 403 BLINK_PLATFORM_EXPORT WebThread* mainThread() const;
412 404
413 // Returns an interface to the compositor thread. This can be null if the 405 // Returns an interface to the compositor thread. This can be null if the
414 // renderer was created with threaded rendering desabled. 406 // renderer was created with threaded rendering desabled.
415 virtual WebThread* compositorThread() const { return 0; } 407 virtual WebThread* compositorThread() const { return 0; }
416 408
417 // Vibration ----------------------------------------------------------- 409 // Vibration -----------------------------------------------------------
418 410
419 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active 411 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 protected: 613 protected:
622 BLINK_PLATFORM_EXPORT Platform(); 614 BLINK_PLATFORM_EXPORT Platform();
623 virtual ~Platform() { } 615 virtual ~Platform() { }
624 616
625 WebThread* m_mainThread; 617 WebThread* m_mainThread;
626 }; 618 };
627 619
628 } // namespace blink 620 } // namespace blink
629 621
630 #endif 622 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698