| 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/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
| 10 #include "core/fileapi/Blob.h" | 10 #include "core/fileapi/Blob.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 bool matches(const String& id, const KURL&) const; | 82 bool matches(const String& id, const KURL&) const; |
| 83 | 83 |
| 84 // Notifies the connection about its state change to 'closed'. | 84 // Notifies the connection about its state change to 'closed'. |
| 85 void didClose(WebPresentationConnectionCloseReason, const String& message); | 85 void didClose(WebPresentationConnectionCloseReason, const String& message); |
| 86 | 86 |
| 87 // WebPresentationConnection implementation. | 87 // WebPresentationConnection implementation. |
| 88 void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) override; | 88 void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) override; |
| 89 void didReceiveTextMessage(const WebString& message) override; | 89 void didReceiveTextMessage(const WebString& message) override; |
| 90 void didReceiveBinaryMessage(const uint8_t* data, size_t length) override; | 90 void didReceiveBinaryMessage(const uint8_t* data, size_t length) override; |
| 91 void didChangeState(WebPresentationConnectionState) override; | 91 void didChangeState(WebPresentationConnectionState) override; |
| 92 void didClose() override; |
| 92 | 93 |
| 93 WebPresentationConnectionState getState(); | 94 WebPresentationConnectionState getState(); |
| 94 void didChangeState(WebPresentationConnectionState, bool shouldDispatchEvent); | 95 void didChangeState(WebPresentationConnectionState, bool shouldDispatchEvent); |
| 95 | 96 |
| 96 protected: | 97 protected: |
| 97 // EventTarget implementation. | 98 // EventTarget implementation. |
| 98 void addedEventListener(const AtomicString& eventType, | 99 void addedEventListener(const AtomicString& eventType, |
| 99 RegisteredEventListener&) override; | 100 RegisteredEventListener&) override; |
| 100 | 101 |
| 101 private: | 102 private: |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 HeapDeque<Member<Message>> m_messages; | 137 HeapDeque<Member<Message>> m_messages; |
| 137 | 138 |
| 138 BinaryType m_binaryType; | 139 BinaryType m_binaryType; |
| 139 | 140 |
| 140 std::unique_ptr<WebPresentationConnectionProxy> m_proxy; | 141 std::unique_ptr<WebPresentationConnectionProxy> m_proxy; |
| 141 }; | 142 }; |
| 142 | 143 |
| 143 } // namespace blink | 144 } // namespace blink |
| 144 | 145 |
| 145 #endif // PresentationConnection_h | 146 #endif // PresentationConnection_h |
| OLD | NEW |