Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: merge with master Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/presentation/test_presentation_connection.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 PresentationConnection::~PresentationConnection() { 159 PresentationConnection::~PresentationConnection() {
160 ASSERT(!m_blobLoader); 160 ASSERT(!m_blobLoader);
161 } 161 }
162 162
163 void PresentationConnection::bindProxy( 163 void PresentationConnection::bindProxy(
164 std::unique_ptr<WebPresentationConnectionProxy> proxy) { 164 std::unique_ptr<WebPresentationConnectionProxy> proxy) {
165 DCHECK(proxy); 165 DCHECK(proxy);
166 // TODO(zhaobin): Restore to DCHECK(!m_proxy) when reconnect() is properly 166 // TODO(zhaobin): Restore to DCHECK(!m_proxy) when reconnect() is properly
167 // implemented. 167 // implemented.
168 if (!m_proxy) 168 m_proxy = std::move(proxy);
169 m_proxy = std::move(proxy);
170 } 169 }
171 170
172 // static 171 // static
173 PresentationConnection* PresentationConnection::take( 172 PresentationConnection* PresentationConnection::take(
174 ScriptPromiseResolver* resolver, 173 ScriptPromiseResolver* resolver,
175 const WebPresentationSessionInfo& sessionInfo, 174 const WebPresentationSessionInfo& sessionInfo,
176 PresentationRequest* request) { 175 PresentationRequest* request) {
177 ASSERT(resolver); 176 ASSERT(resolver);
178 ASSERT(request); 177 ASSERT(request);
179 ASSERT(resolver->getExecutionContext()->isDocument()); 178 ASSERT(resolver->getExecutionContext()->isDocument());
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 void PresentationConnection::tearDown() { 508 void PresentationConnection::tearDown() {
510 // Cancel current Blob loading if any. 509 // Cancel current Blob loading if any.
511 if (m_blobLoader) { 510 if (m_blobLoader) {
512 m_blobLoader->cancel(); 511 m_blobLoader->cancel();
513 m_blobLoader.clear(); 512 m_blobLoader.clear();
514 } 513 }
515 m_messages.clear(); 514 m_messages.clear();
516 } 515 }
517 516
518 } // namespace blink 517 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/presentation/test_presentation_connection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698