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 PlatformMojoInterface; | |
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 // Resource hints IPC / Mojo ------------------------------------------ | |
533 // TODO(csharrison): Move CrossOriginAttributeValue to public/platform and | |
534 // take that as an argument instead of credentialsFlag. | |
535 virtual void preconnect(const KURL&, bool credentialsFlag, int numConnection s); | |
536 virtual void preresolve(const KURL&); | |
537 virtual void speculativePreresolve(const KURL&); | |
kinuko
2016/06/16 05:39:59
Do we need to expose these here?
Charlie Harrison
2016/06/16 11:00:20
No, I did it here to make mocking easy for unit te
| |
538 | |
529 // Platform events ----------------------------------------------------- | 539 // Platform events ----------------------------------------------------- |
530 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. | 540 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. |
531 | 541 |
532 // Request the platform to start listening to the events of the specified | 542 // 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. | 543 // type and notify the given listener (if not null) when there is an update. |
534 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { } | 544 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe ner* listener) { } |
535 | 545 |
536 // Request the platform to stop listening to the specified event and no | 546 // Request the platform to stop listening to the specified event and no |
537 // longer notify the listener, if any. | 547 // longer notify the listener, if any. |
538 virtual void stopListening(WebPlatformEventType type) { } | 548 virtual void stopListening(WebPlatformEventType type) { } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
597 // Background Sync API------------------------------------------------------ ------ | 607 // Background Sync API------------------------------------------------------ ------ |
598 | 608 |
599 virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; } | 609 virtual WebSyncProvider* backgroundSyncProvider() { return nullptr; } |
600 | 610 |
601 // Experimental Framework ---------------------------------------------- | 611 // Experimental Framework ---------------------------------------------- |
602 | 612 |
603 virtual WebTrialTokenValidator* trialTokenValidator() { return nullptr; } | 613 virtual WebTrialTokenValidator* trialTokenValidator() { return nullptr; } |
604 | 614 |
605 protected: | 615 protected: |
606 Platform(); | 616 Platform(); |
607 virtual ~Platform() { } | 617 virtual ~Platform(); |
608 | 618 |
609 WebThread* m_mainThread; | 619 WebThread* m_mainThread; |
620 std::unique_ptr<PlatformMojoInterface> m_mojoInterface; | |
kinuko
2016/06/16 05:39:59
m_mojoInterface's' or m_mojoServices
Charlie Harrison
2016/06/16 11:00:20
m_mojoServices SGTM.
| |
610 }; | 621 }; |
611 | 622 |
612 } // namespace blink | 623 } // namespace blink |
613 | 624 |
614 #endif | 625 #endif |
OLD | NEW |