| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // Disable/Enable sudden termination. | 183 // Disable/Enable sudden termination. |
| 184 virtual void suddenTerminationChanged(bool enabled) { } | 184 virtual void suddenTerminationChanged(bool enabled) { } |
| 185 | 185 |
| 186 | 186 |
| 187 // System -------------------------------------------------------------- | 187 // System -------------------------------------------------------------- |
| 188 | 188 |
| 189 // Returns a value such as "en-US". | 189 // Returns a value such as "en-US". |
| 190 virtual WebString defaultLocale() { return WebString(); } | 190 virtual WebString defaultLocale() { return WebString(); } |
| 191 | 191 |
| 192 // Wall clock time in seconds since the epoch. | |
| 193 virtual double currentTime() { return 0; } | |
| 194 | |
| 195 // Monotonically increasing time in seconds from an arbitrary fixed point in
the past. | |
| 196 // This function is expected to return at least millisecond-precision values
. For this reason, | |
| 197 // it is recommended that the fixed point be no further in the past than the
epoch. | |
| 198 virtual double monotonicallyIncreasingTime() { return 0; } | |
| 199 | |
| 200 // Delayed work is driven by a shared timer. | |
| 201 typedef void (*SharedTimerFunction)(); | |
| 202 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
{ } | |
| 203 virtual void setSharedTimerFireInterval(double) { } | |
| 204 virtual void stopSharedTimer() { } | |
| 205 | |
| 206 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner() { return 0; } | 192 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner() { return 0; } |
| 207 | 193 |
| 208 | 194 |
| 209 // Vibration ----------------------------------------------------------- | 195 // Vibration ----------------------------------------------------------- |
| 210 | 196 |
| 211 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 197 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
| 212 // vibration it will be cancelled before the new one is started. | 198 // vibration it will be cancelled before the new one is started. |
| 213 virtual void vibrate(unsigned time) { } | 199 virtual void vibrate(unsigned time) { } |
| 214 | 200 |
| 215 // Cancels the current vibration, if there is one. | 201 // Cancels the current vibration, if there is one. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // This value must be checked again after a context loss event as the platfo
rm's capabilities may have changed. | 238 // This value must be checked again after a context loss event as the platfo
rm's capabilities may have changed. |
| 253 virtual bool canAccelerate2dCanvas() { return false; } | 239 virtual bool canAccelerate2dCanvas() { return false; } |
| 254 | 240 |
| 255 protected: | 241 protected: |
| 256 virtual ~Platform() { } | 242 virtual ~Platform() { } |
| 257 }; | 243 }; |
| 258 | 244 |
| 259 } // namespace blink | 245 } // namespace blink |
| 260 | 246 |
| 261 #endif // SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ | 247 #endif // SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ |
| OLD | NEW |