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 #include "modules/presentation/PresentationConnection.h" | 5 #include "modules/presentation/PresentationConnection.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
8 #include "core/dom/DOMArrayBuffer.h" | 8 #include "core/dom/DOMArrayBuffer.h" |
9 #include "core/dom/DOMArrayBufferView.h" | 9 #include "core/dom/DOMArrayBufferView.h" |
10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 std::unique_ptr<FileReaderLoader> m_loader; | 145 std::unique_ptr<FileReaderLoader> m_loader; |
146 }; | 146 }; |
147 | 147 |
148 PresentationConnection::PresentationConnection(LocalFrame* frame, | 148 PresentationConnection::PresentationConnection(LocalFrame* frame, |
149 const String& id, | 149 const String& id, |
150 const KURL& url) | 150 const KURL& url) |
151 : ContextClient(frame), | 151 : ContextClient(frame), |
152 m_id(id), | 152 m_id(id), |
153 m_url(url), | 153 m_url(url), |
154 m_state(WebPresentationConnectionState::Connecting), | 154 m_state(WebPresentationConnectionState::Connecting), |
155 m_binaryType(BinaryTypeBlob), | 155 m_binaryType(BinaryTypeArrayBuffer), |
156 m_proxy(nullptr) {} | 156 m_proxy(nullptr) {} |
157 | 157 |
158 PresentationConnection::~PresentationConnection() { | 158 PresentationConnection::~PresentationConnection() { |
159 ASSERT(!m_blobLoader); | 159 ASSERT(!m_blobLoader); |
160 } | 160 } |
161 | 161 |
162 void PresentationConnection::bindProxy( | 162 void PresentationConnection::bindProxy( |
163 std::unique_ptr<WebPresentationConnectionProxy> proxy) { | 163 std::unique_ptr<WebPresentationConnectionProxy> proxy) { |
164 DCHECK(proxy); | 164 DCHECK(proxy); |
165 m_proxy = std::move(proxy); | 165 m_proxy = std::move(proxy); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 void PresentationConnection::tearDown() { | 516 void PresentationConnection::tearDown() { |
517 // Cancel current Blob loading if any. | 517 // Cancel current Blob loading if any. |
518 if (m_blobLoader) { | 518 if (m_blobLoader) { |
519 m_blobLoader->cancel(); | 519 m_blobLoader->cancel(); |
520 m_blobLoader.clear(); | 520 m_blobLoader.clear(); |
521 } | 521 } |
522 m_messages.clear(); | 522 m_messages.clear(); |
523 } | 523 } |
524 | 524 |
525 } // namespace blink | 525 } // namespace blink |
OLD | NEW |