| 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 <memory> | 8 #include <memory> |
| 9 #include "core/dom/ArrayBufferViewHelpers.h" | 9 #include "core/dom/ArrayBufferViewHelpers.h" |
| 10 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // WebPresentationConnection implementation. | 88 // WebPresentationConnection implementation. |
| 89 void BindProxy(std::unique_ptr<WebPresentationConnectionProxy>) override; | 89 void BindProxy(std::unique_ptr<WebPresentationConnectionProxy>) override; |
| 90 void DidReceiveTextMessage(const WebString& message) override; | 90 void DidReceiveTextMessage(const WebString& message) override; |
| 91 void DidReceiveBinaryMessage(const uint8_t* data, size_t length) override; | 91 void DidReceiveBinaryMessage(const uint8_t* data, size_t length) override; |
| 92 void DidChangeState(WebPresentationConnectionState) override; | 92 void DidChangeState(WebPresentationConnectionState) override; |
| 93 void DidClose() override; | 93 void DidClose() override; |
| 94 | 94 |
| 95 WebPresentationConnectionState GetState(); | 95 WebPresentationConnectionState GetState(); |
| 96 void DidChangeState(WebPresentationConnectionState, | 96 void DidChangeState(WebPresentationConnectionState, |
| 97 bool should_dispatch_event); | 97 bool should_dispatch_event); |
| 98 // Notify target connection about connection state change. |
| 99 void NotifyTargetConnection(WebPresentationConnectionState); |
| 98 | 100 |
| 99 protected: | 101 protected: |
| 100 // EventTarget implementation. | 102 // EventTarget implementation. |
| 101 void AddedEventListener(const AtomicString& event_type, | 103 void AddedEventListener(const AtomicString& event_type, |
| 102 RegisteredEventListener&) override; | 104 RegisteredEventListener&) override; |
| 103 | 105 |
| 104 private: | 106 private: |
| 105 class BlobLoader; | 107 class BlobLoader; |
| 106 | 108 |
| 107 enum MessageType { | 109 enum MessageType { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 HeapDeque<Member<Message>> messages_; | 141 HeapDeque<Member<Message>> messages_; |
| 140 | 142 |
| 141 BinaryType binary_type_; | 143 BinaryType binary_type_; |
| 142 | 144 |
| 143 std::unique_ptr<WebPresentationConnectionProxy> proxy_; | 145 std::unique_ptr<WebPresentationConnectionProxy> proxy_; |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 } // namespace blink | 148 } // namespace blink |
| 147 | 149 |
| 148 #endif // PresentationConnection_h | 150 #endif // PresentationConnection_h |
| OLD | NEW |