| OLD | NEW |
| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // This function is expected to return at least millisecond-precision values
. For this reason, | 248 // This function is expected to return at least millisecond-precision values
. For this reason, |
| 249 // it is recommended that the fixed point be no further in the past than the
epoch. | 249 // it is recommended that the fixed point be no further in the past than the
epoch. |
| 250 virtual double monotonicallyIncreasingTime() { return 0; } | 250 virtual double monotonicallyIncreasingTime() { return 0; } |
| 251 | 251 |
| 252 // Delayed work is driven by a shared timer. | 252 // Delayed work is driven by a shared timer. |
| 253 typedef void (*SharedTimerFunction)(); | 253 typedef void (*SharedTimerFunction)(); |
| 254 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
{ } | 254 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
{ } |
| 255 virtual void setSharedTimerFireInterval(double) { } | 255 virtual void setSharedTimerFireInterval(double) { } |
| 256 virtual void stopSharedTimer() { } | 256 virtual void stopSharedTimer() { } |
| 257 | 257 |
| 258 // Callable from a background WebKit thread. | |
| 259 virtual void callOnMainThread(void (*func)(void*), void* context) { } | |
| 260 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner() { return 0; } | 258 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner() { return 0; } |
| 261 | 259 |
| 262 | 260 |
| 263 // Vibration ----------------------------------------------------------- | 261 // Vibration ----------------------------------------------------------- |
| 264 | 262 |
| 265 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 263 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
| 266 // vibration it will be cancelled before the new one is started. | 264 // vibration it will be cancelled before the new one is started. |
| 267 virtual void vibrate(unsigned time) { } | 265 virtual void vibrate(unsigned time) { } |
| 268 | 266 |
| 269 // Cancels the current vibration, if there is one. | 267 // Cancels the current vibration, if there is one. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // longer notify the listener, if any. | 418 // longer notify the listener, if any. |
| 421 virtual void stopListening(WebPlatformEventType type) { } | 419 virtual void stopListening(WebPlatformEventType type) { } |
| 422 | 420 |
| 423 protected: | 421 protected: |
| 424 virtual ~Platform() { } | 422 virtual ~Platform() { } |
| 425 }; | 423 }; |
| 426 | 424 |
| 427 } // namespace blink | 425 } // namespace blink |
| 428 | 426 |
| 429 #endif | 427 #endif |
| OLD | NEW |