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

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

Issue 2470023002: [Presentation API] change initial state of PresentationConnection to 'connecting' (Closed)
Patch Set: resolve code review comments from Derek and rebase with master Created 4 years, 1 month 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/browser/presentation/presentation_service_impl_unittest.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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 Member<PresentationConnection> m_PresentationConnection; 144 Member<PresentationConnection> m_PresentationConnection;
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 : DOMWindowProperty(frame), 151 : DOMWindowProperty(frame),
152 m_id(id), 152 m_id(id),
153 m_url(url), 153 m_url(url),
154 // TODO(zhaobin): change initial state to Connecting. (crbug/659423) 154 m_state(WebPresentationConnectionState::Connecting),
155 m_state(WebPresentationConnectionState::Connected),
156 m_binaryType(BinaryTypeBlob) {} 155 m_binaryType(BinaryTypeBlob) {}
157 156
158 PresentationConnection::~PresentationConnection() { 157 PresentationConnection::~PresentationConnection() {
159 ASSERT(!m_blobLoader); 158 ASSERT(!m_blobLoader);
160 } 159 }
161 160
162 // static 161 // static
163 PresentationConnection* PresentationConnection::take( 162 PresentationConnection* PresentationConnection::take(
164 ScriptPromiseResolver* resolver, 163 ScriptPromiseResolver* resolver,
165 std::unique_ptr<WebPresentationConnectionClient> client, 164 std::unique_ptr<WebPresentationConnectionClient> client,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 void PresentationConnection::tearDown() { 467 void PresentationConnection::tearDown() {
469 // Cancel current Blob loading if any. 468 // Cancel current Blob loading if any.
470 if (m_blobLoader) { 469 if (m_blobLoader) {
471 m_blobLoader->cancel(); 470 m_blobLoader->cancel();
472 m_blobLoader.clear(); 471 m_blobLoader.clear();
473 } 472 }
474 m_messages.clear(); 473 m_messages.clear();
475 } 474 }
476 475
477 } // namespace blink 476 } // namespace blink
OLDNEW
« no previous file with comments | « content/browser/presentation/presentation_service_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698