| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 PresentationConnection(LocalFrame*, const String& id, const KURL&); | 108 PresentationConnection(LocalFrame*, const String& id, const KURL&); |
| 109 | 109 |
| 110 bool canSendMessage(ExceptionState&); | 110 bool canSendMessage(ExceptionState&); |
| 111 void handleMessageQueue(); | 111 void handleMessageQueue(); |
| 112 | 112 |
| 113 // Callbacks invoked from BlobLoader. | 113 // Callbacks invoked from BlobLoader. |
| 114 void didFinishLoadingBlob(DOMArrayBuffer*); | 114 void didFinishLoadingBlob(DOMArrayBuffer*); |
| 115 void didFailLoadingBlob(FileError::ErrorCode); | 115 void didFailLoadingBlob(FileError::ErrorCode); |
| 116 | 116 |
| 117 // Internal helper function to dispatch connect event asynchronously. |
| 118 void dispatchConnectEvent(); |
| 119 |
| 117 // Cancel loads and pending messages when the connection is closed. | 120 // Cancel loads and pending messages when the connection is closed. |
| 118 void tearDown(); | 121 void tearDown(); |
| 119 | 122 |
| 120 String m_id; | 123 String m_id; |
| 121 KURL m_url; | 124 KURL m_url; |
| 122 WebPresentationConnectionState m_state; | 125 WebPresentationConnectionState m_state; |
| 123 | 126 |
| 124 // For Blob data handling. | 127 // For Blob data handling. |
| 125 Member<BlobLoader> m_blobLoader; | 128 Member<BlobLoader> m_blobLoader; |
| 126 HeapDeque<Member<Message>> m_messages; | 129 HeapDeque<Member<Message>> m_messages; |
| 127 | 130 |
| 128 BinaryType m_binaryType; | 131 BinaryType m_binaryType; |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace blink | 134 } // namespace blink |
| 132 | 135 |
| 133 #endif // PresentationConnection_h | 136 #endif // PresentationConnection_h |
| OLD | NEW |