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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef Platform_h | 31 #ifndef Platform_h |
32 #define Platform_h | 32 #define Platform_h |
33 | 33 |
| 34 #include <memory> |
| 35 |
34 #ifdef WIN32 | 36 #ifdef WIN32 |
35 #include <windows.h> | 37 #include <windows.h> |
36 #endif | 38 #endif |
37 | 39 |
38 #include "BlameContext.h" | 40 #include "BlameContext.h" |
39 #include "UserMetricsAction.h" | 41 #include "UserMetricsAction.h" |
40 #include "WebAudioDevice.h" | 42 #include "WebAudioDevice.h" |
41 #include "WebCommon.h" | 43 #include "WebCommon.h" |
42 #include "WebData.h" | 44 #include "WebData.h" |
43 #include "WebDeviceLightListener.h" | 45 #include "WebDeviceLightListener.h" |
(...skipping 13 matching lines...) Expand all Loading... |
57 | 59 |
58 class GrContext; | 60 class GrContext; |
59 | 61 |
60 namespace v8 { | 62 namespace v8 { |
61 class Context; | 63 class Context; |
62 template<class T> class Local; | 64 template<class T> class Local; |
63 } | 65 } |
64 | 66 |
65 namespace blink { | 67 namespace blink { |
66 | 68 |
| 69 class PlatformMojoServices; |
67 class ServiceRegistry; | 70 class ServiceRegistry; |
68 class WebAudioBus; | 71 class WebAudioBus; |
69 class WebBlobRegistry; | 72 class WebBlobRegistry; |
70 class WebCanvasCaptureHandler; | 73 class WebCanvasCaptureHandler; |
71 class WebClipboard; | 74 class WebClipboard; |
72 class WebCompositorSupport; | 75 class WebCompositorSupport; |
73 class WebCookieJar; | 76 class WebCookieJar; |
74 class WebCrypto; | 77 class WebCrypto; |
75 class WebDatabaseObserver; | 78 class WebDatabaseObserver; |
76 class WebPlatformEventListener; | 79 class WebPlatformEventListener; |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 virtual bool allowScriptExtensionForServiceWorker(const WebURL& scriptUrl) {
return false; } | 522 virtual bool allowScriptExtensionForServiceWorker(const WebURL& scriptUrl) {
return false; } |
520 | 523 |
521 // WebCrypto ---------------------------------------------------------- | 524 // WebCrypto ---------------------------------------------------------- |
522 | 525 |
523 virtual WebCrypto* crypto() { return nullptr; } | 526 virtual WebCrypto* crypto() { return nullptr; } |
524 | 527 |
525 // Mojo --------------------------------------------------------------- | 528 // Mojo --------------------------------------------------------------- |
526 | 529 |
527 virtual ServiceRegistry* serviceRegistry(); | 530 virtual ServiceRegistry* serviceRegistry(); |
528 | 531 |
| 532 PlatformMojoServices* mojoServices(); |
| 533 |
529 // Platform events ----------------------------------------------------- | 534 // Platform events ----------------------------------------------------- |
530 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. | 535 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. |
531 | 536 |
532 // Request the platform to start listening to the events of the specified | 537 // Request the platform to start listening to the events of the specified |
533 // type and notify the given listener (if not null) when there is an update. | 538 // type and notify the given listener (if not null) when there is an update. |
534 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } | 539 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } |
535 | 540 |
536 // Request the platform to stop listening to the specified event and no | 541 // Request the platform to stop listening to the specified event and no |
537 // longer notify the listener, if any. | 542 // longer notify the listener, if any. |
538 virtual void stopListening(WebPlatformEventType type) { } | 543 virtual void stopListening(WebPlatformEventType type) { } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 // Background Sync API------------------------------------------------------
------ | 602 // Background Sync API------------------------------------------------------
------ |
598 | 603 |
599 virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; } | 604 virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; } |
600 | 605 |
601 // Experimental Framework ---------------------------------------------- | 606 // Experimental Framework ---------------------------------------------- |
602 | 607 |
603 virtual WebTrialTokenValidator* trialTokenValidator() { return nullptr; } | 608 virtual WebTrialTokenValidator* trialTokenValidator() { return nullptr; } |
604 | 609 |
605 protected: | 610 protected: |
606 Platform(); | 611 Platform(); |
607 virtual ~Platform() { } | 612 virtual ~Platform(); |
608 | 613 |
609 WebThread* m_mainThread; | 614 WebThread* m_mainThread; |
| 615 std::unique_ptr<PlatformMojoServices> m_mojoServices; |
610 }; | 616 }; |
611 | 617 |
612 } // namespace blink | 618 } // namespace blink |
613 | 619 |
614 #endif | 620 #endif |
OLD | NEW |