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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #ifndef Platform_h | 31 #ifndef Platform_h |
32 #define Platform_h | 32 #define Platform_h |
33 | 33 |
34 #ifdef WIN32 | 34 #ifdef WIN32 |
35 #include <windows.h> | 35 #include <windows.h> |
36 #endif | 36 #endif |
37 | 37 |
38 #include "WebAudioDevice.h" | 38 #include "WebAudioDevice.h" |
39 #include "WebBatteryStatusListener.h" | |
40 #include "WebCommon.h" | 39 #include "WebCommon.h" |
41 #include "WebData.h" | 40 #include "WebData.h" |
42 #include "WebDeviceLightListener.h" | 41 #include "WebDeviceLightListener.h" |
43 #include "WebGamepadListener.h" | 42 #include "WebGamepadListener.h" |
44 #include "WebGamepads.h" | 43 #include "WebGamepads.h" |
45 #include "WebGestureDevice.h" | 44 #include "WebGestureDevice.h" |
46 #include "WebGraphicsContext3D.h" | 45 #include "WebGraphicsContext3D.h" |
47 #include "WebLocalizedString.h" | 46 #include "WebLocalizedString.h" |
48 #include "WebPlatformEventType.h" | 47 #include "WebPlatformEventType.h" |
49 #include "WebSize.h" | 48 #include "WebSize.h" |
50 #include "WebSpeechSynthesizer.h" | 49 #include "WebSpeechSynthesizer.h" |
51 #include "WebStorageQuotaCallbacks.h" | 50 #include "WebStorageQuotaCallbacks.h" |
52 #include "WebStorageQuotaType.h" | 51 #include "WebStorageQuotaType.h" |
53 #include "WebString.h" | 52 #include "WebString.h" |
54 #include "WebURLError.h" | 53 #include "WebURLError.h" |
55 #include "WebVector.h" | 54 #include "WebVector.h" |
56 #include "WebWaitableEvent.h" | 55 #include "WebWaitableEvent.h" |
57 | 56 |
| 57 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 58 #include "mojo/public/cpp/bindings/interface_request.h" |
| 59 #include "mojo/public/cpp/system/core.h" |
| 60 |
58 class GrContext; | 61 class GrContext; |
59 | 62 |
60 namespace blink { | 63 namespace blink { |
61 | 64 |
62 class WebApiKeyValidator; | 65 class WebApiKeyValidator; |
63 class WebAudioBus; | 66 class WebAudioBus; |
64 class WebBlobRegistry; | 67 class WebBlobRegistry; |
65 class WebCanvasCaptureHandler; | 68 class WebCanvasCaptureHandler; |
66 class WebClipboard; | 69 class WebClipboard; |
67 class WebCompositorSupport; | 70 class WebCompositorSupport; |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 virtual void willStopWorkerThread() { } | 554 virtual void willStopWorkerThread() { } |
552 | 555 |
553 // WebCrypto ---------------------------------------------------------- | 556 // WebCrypto ---------------------------------------------------------- |
554 | 557 |
555 virtual WebCrypto* crypto() { return nullptr; } | 558 virtual WebCrypto* crypto() { return nullptr; } |
556 | 559 |
557 | 560 |
558 // Platform events ----------------------------------------------------- | 561 // Platform events ----------------------------------------------------- |
559 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. | 562 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. |
560 | 563 |
| 564 // Connects the mojo handle to the remote service provider. |
| 565 template<typename Interface> |
| 566 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr) |
| 567 { |
| 568 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe()); |
| 569 } |
| 570 virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePip
eHandle handle) { } |
| 571 |
561 // Request the platform to start listening to the events of the specified | 572 // Request the platform to start listening to the events of the specified |
562 // type and notify the given listener (if not null) when there is an update. | 573 // type and notify the given listener (if not null) when there is an update. |
563 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } | 574 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } |
564 | 575 |
565 // Request the platform to stop listening to the specified event and no | 576 // Request the platform to stop listening to the specified event and no |
566 // longer notify the listener, if any. | 577 // longer notify the listener, if any. |
567 virtual void stopListening(WebPlatformEventType type) { } | 578 virtual void stopListening(WebPlatformEventType type) { } |
568 | 579 |
569 // This method converts from the supplied DOM code enum to the | 580 // This method converts from the supplied DOM code enum to the |
570 // embedder's DOM code value for the key pressed. |domCode| values are | 581 // embedder's DOM code value for the key pressed. |domCode| values are |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 protected: | 659 protected: |
649 BLINK_PLATFORM_EXPORT Platform(); | 660 BLINK_PLATFORM_EXPORT Platform(); |
650 virtual ~Platform() { } | 661 virtual ~Platform() { } |
651 | 662 |
652 WebThread* m_mainThread; | 663 WebThread* m_mainThread; |
653 }; | 664 }; |
654 | 665 |
655 } // namespace blink | 666 } // namespace blink |
656 | 667 |
657 #endif | 668 #endif |
OLD | NEW |