| 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" |
| 39 #include "WebCommon.h" | 40 #include "WebCommon.h" |
| 40 #include "WebData.h" | 41 #include "WebData.h" |
| 41 #include "WebDeviceLightListener.h" | 42 #include "WebDeviceLightListener.h" |
| 42 #include "WebGamepadListener.h" | 43 #include "WebGamepadListener.h" |
| 43 #include "WebGamepads.h" | 44 #include "WebGamepads.h" |
| 44 #include "WebGestureDevice.h" | 45 #include "WebGestureDevice.h" |
| 45 #include "WebGraphicsContext3D.h" | 46 #include "WebGraphicsContext3D.h" |
| 46 #include "WebLocalizedString.h" | 47 #include "WebLocalizedString.h" |
| 47 #include "WebPlatformEventType.h" | 48 #include "WebPlatformEventType.h" |
| 48 #include "WebSize.h" | 49 #include "WebSize.h" |
| 49 #include "WebSpeechSynthesizer.h" | 50 #include "WebSpeechSynthesizer.h" |
| 50 #include "WebStorageQuotaCallbacks.h" | 51 #include "WebStorageQuotaCallbacks.h" |
| 51 #include "WebStorageQuotaType.h" | 52 #include "WebStorageQuotaType.h" |
| 52 #include "WebString.h" | 53 #include "WebString.h" |
| 53 #include "WebURLError.h" | 54 #include "WebURLError.h" |
| 54 #include "WebVector.h" | 55 #include "WebVector.h" |
| 55 | 56 |
| 56 #include "mojo/public/cpp/bindings/interface_request.h" | |
| 57 #include "mojo/public/cpp/system/core.h" | |
| 58 | |
| 59 class GrContext; | 57 class GrContext; |
| 60 | 58 |
| 61 namespace blink { | 59 namespace blink { |
| 62 | 60 |
| 63 class WebAudioBus; | 61 class WebAudioBus; |
| 64 class WebBlobRegistry; | 62 class WebBlobRegistry; |
| 65 class WebCanvasCaptureHandler; | 63 class WebCanvasCaptureHandler; |
| 66 class WebClipboard; | 64 class WebClipboard; |
| 67 class WebCompositorSupport; | 65 class WebCompositorSupport; |
| 68 class WebCookieJar; | 66 class WebCookieJar; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 virtual void willStopWorkerThread() { } | 496 virtual void willStopWorkerThread() { } |
| 499 | 497 |
| 500 // WebCrypto ---------------------------------------------------------- | 498 // WebCrypto ---------------------------------------------------------- |
| 501 | 499 |
| 502 virtual WebCrypto* crypto() { return nullptr; } | 500 virtual WebCrypto* crypto() { return nullptr; } |
| 503 | 501 |
| 504 | 502 |
| 505 // Platform events ----------------------------------------------------- | 503 // Platform events ----------------------------------------------------- |
| 506 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. | 504 // Device Orientation, Device Motion, Device Light, Battery, Gamepad. |
| 507 | 505 |
| 508 // Connects the mojo handle to the remote service provider. | |
| 509 template <typename Interface> | |
| 510 void connectToRemoteService(mojo::InterfaceRequest<Interface> ptr) | |
| 511 { | |
| 512 connectToRemoteService(Interface::Name_, ptr.PassMessagePipe()); | |
| 513 } | |
| 514 virtual void connectToRemoteService(const char* name, mojo::ScopedMessagePip
eHandle handle) { } | |
| 515 | |
| 516 // Request the platform to start listening to the events of the specified | 506 // Request the platform to start listening to the events of the specified |
| 517 // type and notify the given listener (if not null) when there is an update. | 507 // type and notify the given listener (if not null) when there is an update. |
| 518 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } | 508 virtual void startListening(WebPlatformEventType type, WebPlatformEventListe
ner* listener) { } |
| 519 | 509 |
| 520 // Request the platform to stop listening to the specified event and no | 510 // Request the platform to stop listening to the specified event and no |
| 521 // longer notify the listener, if any. | 511 // longer notify the listener, if any. |
| 522 virtual void stopListening(WebPlatformEventType type) { } | 512 virtual void stopListening(WebPlatformEventType type) { } |
| 523 | 513 |
| 524 // This method converts from the supplied DOM code enum to the | 514 // This method converts from the supplied DOM code enum to the |
| 525 // embedder's DOM code value for the key pressed. |domCode| values are | 515 // 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... |
| 603 protected: | 593 protected: |
| 604 BLINK_PLATFORM_EXPORT Platform(); | 594 BLINK_PLATFORM_EXPORT Platform(); |
| 605 virtual ~Platform() { } | 595 virtual ~Platform() { } |
| 606 | 596 |
| 607 WebThread* m_mainThread; | 597 WebThread* m_mainThread; |
| 608 }; | 598 }; |
| 609 | 599 |
| 610 } // namespace blink | 600 } // namespace blink |
| 611 | 601 |
| 612 #endif | 602 #endif |
| OLD | NEW |