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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // Returns a localized string resource (with substitution parameters). | 347 // Returns a localized string resource (with substitution parameters). |
348 virtual WebString queryLocalizedString(WebLocalizedString::Name) { return We
bString(); } | 348 virtual WebString queryLocalizedString(WebLocalizedString::Name) { return We
bString(); } |
349 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter) { return WebString(); } | 349 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter) { return WebString(); } |
350 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter1, const WebString& parameter2) { return WebString(); } | 350 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter1, const WebString& parameter2) { return WebString(); } |
351 | 351 |
352 | 352 |
353 // Threads ------------------------------------------------------- | 353 // Threads ------------------------------------------------------- |
354 | 354 |
355 // Creates an embedder-defined thread. | 355 // Creates an embedder-defined thread. |
356 virtual WebThread* createThread(const char* name) { return nullptr; } | 356 virtual WebThread* createThread(const char* name) { return nullptr; } |
| 357 virtual WebThread* createThreadForCompositor(const char* name) { return null
ptr; } |
357 | 358 |
358 // Returns an interface to the current thread. This is owned by the | 359 // Returns an interface to the current thread. This is owned by the |
359 // embedder. | 360 // embedder. |
360 virtual WebThread* currentThread() { return nullptr; } | 361 virtual WebThread* currentThread() { return nullptr; } |
361 | 362 |
362 // Yield the current thread so another thread can be scheduled. | 363 // Yield the current thread so another thread can be scheduled. |
363 virtual void yieldCurrentThread() { } | 364 virtual void yieldCurrentThread() { } |
364 | 365 |
365 // WaitableEvent ------------------------------------------------------- | 366 // WaitableEvent ------------------------------------------------------- |
366 | 367 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 // System trace time in seconds. For example, on Chrome OS, this timestamp s
hould be | 428 // System trace time in seconds. For example, on Chrome OS, this timestamp s
hould be |
428 // synchronized with ftrace timestamps. | 429 // synchronized with ftrace timestamps. |
429 virtual double systemTraceTime() { return 0; } | 430 virtual double systemTraceTime() { return 0; } |
430 | 431 |
431 // WebKit clients must implement this funcion if they use cryptographic rand
omness. | 432 // WebKit clients must implement this funcion if they use cryptographic rand
omness. |
432 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; | 433 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len
gth) = 0; |
433 | 434 |
434 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. | 435 // Returns an interface to the main thread. Can be null if blink was initial
ized on a thread without a message loop. |
435 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; | 436 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; |
436 | 437 |
| 438 virtual WebThread* compositorThread() const { return 0; } |
| 439 |
437 // Vibration ----------------------------------------------------------- | 440 // Vibration ----------------------------------------------------------- |
438 | 441 |
439 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active | 442 // Starts a vibration for the given duration in milliseconds. If there is cu
rrently an active |
440 // vibration it will be cancelled before the new one is started. | 443 // vibration it will be cancelled before the new one is started. |
441 virtual void vibrate(unsigned time) { } | 444 virtual void vibrate(unsigned time) { } |
442 | 445 |
443 // Cancels the current vibration, if there is one. | 446 // Cancels the current vibration, if there is one. |
444 virtual void cancelVibration() { } | 447 virtual void cancelVibration() { } |
445 | 448 |
446 | 449 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 protected: | 731 protected: |
729 BLINK_PLATFORM_EXPORT Platform(); | 732 BLINK_PLATFORM_EXPORT Platform(); |
730 virtual ~Platform() { } | 733 virtual ~Platform() { } |
731 | 734 |
732 WebThread* m_mainThread; | 735 WebThread* m_mainThread; |
733 }; | 736 }; |
734 | 737 |
735 } // namespace blink | 738 } // namespace blink |
736 | 739 |
737 #endif | 740 #endif |
OLD | NEW |