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

Side by Side Diff: third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp

Issue 1942723004: Change EventTarget callback APIs for add/RemoveEventListenerInternal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win32 signed/unsigned issue Created 4 years, 7 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
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/imagecapture/ImageCapture.h" 5 #include "modules/imagecapture/ImageCapture.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "core/dom/DOMException.h" 9 #include "core/dom/DOMException.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 void ImageCapture::onServiceConnectionError() 151 void ImageCapture::onServiceConnectionError()
152 { 152 {
153 m_service.reset(); 153 m_service.reset();
154 for (ScriptPromiseResolver* resolver : m_serviceRequests) 154 for (ScriptPromiseResolver* resolver : m_serviceRequests)
155 resolver->reject(DOMException::create(NotFoundError, kNoServiceError)); 155 resolver->reject(DOMException::create(NotFoundError, kNoServiceError));
156 m_serviceRequests.clear(); 156 m_serviceRequests.clear();
157 } 157 }
158 158
159 bool ImageCapture::addEventListenerInternal(const AtomicString& eventType, Event Listener* listener, const EventListenerOptions& options)
160 {
161 return EventTarget::addEventListenerInternal(eventType, listener, options);
162 }
163
164 DEFINE_TRACE(ImageCapture) 159 DEFINE_TRACE(ImageCapture)
165 { 160 {
166 visitor->trace(m_streamTrack); 161 visitor->trace(m_streamTrack);
167 visitor->trace(m_serviceRequests); 162 visitor->trace(m_serviceRequests);
168 EventTargetWithInlineData::trace(visitor); 163 EventTargetWithInlineData::trace(visitor);
169 ContextLifecycleObserver::trace(visitor); 164 ContextLifecycleObserver::trace(visitor);
170 } 165 }
171 166
172 } // namespace blink 167 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698