| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PresentationConnection_h | 5 #ifndef PresentationConnection_h |
| 6 #define PresentationConnection_h | 6 #define PresentationConnection_h |
| 7 | 7 |
| 8 #include "core/events/EventTarget.h" | 8 #include "core/events/EventTarget.h" |
| 9 #include "core/fileapi/Blob.h" | 9 #include "core/fileapi/Blob.h" |
| 10 #include "core/fileapi/FileError.h" | 10 #include "core/fileapi/FileError.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Notifies the connection about its state change to 'closed'. | 71 // Notifies the connection about its state change to 'closed'. |
| 72 void didClose(WebPresentationConnectionCloseReason, const String& message); | 72 void didClose(WebPresentationConnectionCloseReason, const String& message); |
| 73 | 73 |
| 74 // Notifies the presentation about new message. | 74 // Notifies the presentation about new message. |
| 75 void didReceiveTextMessage(const String& message); | 75 void didReceiveTextMessage(const String& message); |
| 76 void didReceiveBinaryMessage(const uint8_t* data, size_t length); | 76 void didReceiveBinaryMessage(const uint8_t* data, size_t length); |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 // EventTarget implementation. | 79 // EventTarget implementation. |
| 80 bool addEventListenerInternal(const AtomicString& eventType, EventListener*,
const EventListenerOptions&) override; | 80 void addedEventListener(const AtomicString& eventType, RegisteredEventListen
er&) override; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 class BlobLoader; | 83 class BlobLoader; |
| 84 | 84 |
| 85 enum MessageType { | 85 enum MessageType { |
| 86 MessageTypeText, | 86 MessageTypeText, |
| 87 MessageTypeArrayBuffer, | 87 MessageTypeArrayBuffer, |
| 88 MessageTypeBlob, | 88 MessageTypeBlob, |
| 89 }; | 89 }; |
| 90 | 90 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 114 // For Blob data handling. | 114 // For Blob data handling. |
| 115 Member<BlobLoader> m_blobLoader; | 115 Member<BlobLoader> m_blobLoader; |
| 116 HeapDeque<Member<Message>> m_messages; | 116 HeapDeque<Member<Message>> m_messages; |
| 117 | 117 |
| 118 BinaryType m_binaryType; | 118 BinaryType m_binaryType; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace blink | 121 } // namespace blink |
| 122 | 122 |
| 123 #endif // PresentationConnection_h | 123 #endif // PresentationConnection_h |
| OLD | NEW |