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

Side by Side Diff: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp

Issue 2463453002: "Fix" remaining connection error handlers in Blink (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/webshare/NavigatorShare.h" 5 #include "modules/webshare/NavigatorShare.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/ExceptionCode.h" 9 #include "core/dom/ExceptionCode.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return promise; 120 return promise;
121 } 121 }
122 122
123 ScriptPromise NavigatorShare::share(ScriptState* scriptState, 123 ScriptPromise NavigatorShare::share(ScriptState* scriptState,
124 Navigator& navigator, 124 Navigator& navigator,
125 const ShareData& shareData) { 125 const ShareData& shareData) {
126 return from(navigator).share(scriptState, shareData); 126 return from(navigator).share(scriptState, shareData);
127 } 127 }
128 128
129 void NavigatorShare::onConnectionError() { 129 void NavigatorShare::onConnectionError() {
130 if (!Platform::current()) {
131 // TODO(rockot): Clean this up once renderer shutdown sequence is fixed.
132 return;
133 }
134
130 for (auto& client : m_clients) { 135 for (auto& client : m_clients) {
131 client->onConnectionError(); 136 client->onConnectionError();
132 } 137 }
133 m_clients.clear(); 138 m_clients.clear();
134 m_service.reset(); 139 m_service.reset();
135 } 140 }
136 141
137 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp ('k') | third_party/WebKit/Source/modules/webusb/USB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698