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

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

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/PresentationRequest.h" 5 #include "modules/presentation/PresentationRequest.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 new PresentationRequest(executionContext, parsedUrl); 80 new PresentationRequest(executionContext, parsedUrl);
81 request->suspendIfNeeded(); 81 request->suspendIfNeeded();
82 return request; 82 return request;
83 } 83 }
84 84
85 const AtomicString& PresentationRequest::interfaceName() const { 85 const AtomicString& PresentationRequest::interfaceName() const {
86 return EventTargetNames::PresentationRequest; 86 return EventTargetNames::PresentationRequest;
87 } 87 }
88 88
89 ExecutionContext* PresentationRequest::getExecutionContext() const { 89 ExecutionContext* PresentationRequest::getExecutionContext() const {
90 return ActiveDOMObject::getExecutionContext(); 90 return SuspendableObject::getExecutionContext();
91 } 91 }
92 92
93 void PresentationRequest::addedEventListener( 93 void PresentationRequest::addedEventListener(
94 const AtomicString& eventType, 94 const AtomicString& eventType,
95 RegisteredEventListener& registeredListener) { 95 RegisteredEventListener& registeredListener) {
96 EventTargetWithInlineData::addedEventListener(eventType, registeredListener); 96 EventTargetWithInlineData::addedEventListener(eventType, registeredListener);
97 if (eventType == EventTypeNames::connectionavailable) 97 if (eventType == EventTypeNames::connectionavailable)
98 UseCounter::count( 98 UseCounter::count(
99 getExecutionContext(), 99 getExecutionContext(),
100 UseCounter::PresentationRequestConnectionAvailableEventListener); 100 UseCounter::PresentationRequestConnectionAvailableEventListener);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 WTF::makeUnique<PresentationAvailabilityCallbacks>(resolver, m_url)); 198 WTF::makeUnique<PresentationAvailabilityCallbacks>(resolver, m_url));
199 return resolver->promise(); 199 return resolver->promise();
200 } 200 }
201 201
202 const KURL& PresentationRequest::url() const { 202 const KURL& PresentationRequest::url() const {
203 return m_url; 203 return m_url;
204 } 204 }
205 205
206 DEFINE_TRACE(PresentationRequest) { 206 DEFINE_TRACE(PresentationRequest) {
207 EventTargetWithInlineData::trace(visitor); 207 EventTargetWithInlineData::trace(visitor);
208 ActiveDOMObject::trace(visitor); 208 SuspendableObject::trace(visitor);
209 } 209 }
210 210
211 PresentationRequest::PresentationRequest(ExecutionContext* executionContext, 211 PresentationRequest::PresentationRequest(ExecutionContext* executionContext,
212 const KURL& url) 212 const KURL& url)
213 : ActiveScriptWrappable(this), 213 : ActiveScriptWrappable(this),
214 ActiveDOMObject(executionContext), 214 SuspendableObject(executionContext),
215 m_url(url) {} 215 m_url(url) {}
216 216
217 } // namespace blink 217 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698