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

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: Merrrge agaaain. 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
« no previous file with comments | « third_party/WebKit/Source/wtf/testing/RunAllTests.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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // is preferable to disable sudden termination on a per-frame level via 375 // is preferable to disable sudden termination on a per-frame level via
376 // WebFrameClient::suddenTerminationDisablerChanged. 376 // WebFrameClient::suddenTerminationDisablerChanged.
377 virtual void suddenTerminationChanged(bool enabled) { } 377 virtual void suddenTerminationChanged(bool enabled) { }
378 378
379 379
380 // System -------------------------------------------------------------- 380 // System --------------------------------------------------------------
381 381
382 // Returns a value such as "en-US". 382 // Returns a value such as "en-US".
383 virtual WebString defaultLocale() { return WebString(); } 383 virtual WebString defaultLocale() { return WebString(); }
384 384
385 // Wall clock time in seconds since the epoch.
386 virtual double currentTimeSeconds() { return 0; }
387
388 // Monotonically increasing time in seconds from an arbitrary fixed point in the past.
389 // This function is expected to return at least millisecond-precision values . For this reason,
390 // it is recommended that the fixed point be no further in the past than the epoch.
391 virtual double monotonicallyIncreasingTimeSeconds() { return 0; }
392
393 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. 385 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop.
394 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; 386 BLINK_PLATFORM_EXPORT WebThread* mainThread() const;
395 387
396 // Returns an interface to the compositor thread. This can be null if the 388 // Returns an interface to the compositor thread. This can be null if the
397 // renderer was created with threaded rendering desabled. 389 // renderer was created with threaded rendering desabled.
398 virtual WebThread* compositorThread() const { return 0; } 390 virtual WebThread* compositorThread() const { return 0; }
399 391
400 // Vibration ----------------------------------------------------------- 392 // Vibration -----------------------------------------------------------
401 393
402 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active 394 // 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
604 protected: 596 protected:
605 BLINK_PLATFORM_EXPORT Platform(); 597 BLINK_PLATFORM_EXPORT Platform();
606 virtual ~Platform() { } 598 virtual ~Platform() { }
607 599
608 WebThread* m_mainThread; 600 WebThread* m_mainThread;
609 }; 601 };
610 602
611 } // namespace blink 603 } // namespace blink
612 604
613 #endif 605 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/testing/RunAllTests.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698