| OLD | NEW |
| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 DEFINE_TRACE(PresentationRequest) { | 221 DEFINE_TRACE(PresentationRequest) { |
| 222 visitor->trace(m_availabilityProperty); | 222 visitor->trace(m_availabilityProperty); |
| 223 EventTargetWithInlineData::trace(visitor); | 223 EventTargetWithInlineData::trace(visitor); |
| 224 ContextLifecycleObserver::trace(visitor); | 224 ContextLifecycleObserver::trace(visitor); |
| 225 } | 225 } |
| 226 | 226 |
| 227 PresentationRequest::PresentationRequest(ExecutionContext* executionContext, | 227 PresentationRequest::PresentationRequest(ExecutionContext* executionContext, |
| 228 const Vector<KURL>& urls) | 228 const Vector<KURL>& urls) |
| 229 : ContextLifecycleObserver(executionContext), m_urls(urls) {} | 229 : ContextLifecycleObserver(executionContext), m_urls(urls) { |
| 230 recordOriginTypeAccess(executionContext); |
| 231 } |
| 232 |
| 233 void PresentationRequest::recordOriginTypeAccess( |
| 234 ExecutionContext* executionContext) const { |
| 235 DCHECK(executionContext); |
| 236 if (executionContext->isSecureContext()) { |
| 237 UseCounter::count(executionContext, |
| 238 UseCounter::PresentationRequestSecureOrigin); |
| 239 } else { |
| 240 UseCounter::count(executionContext, |
| 241 UseCounter::PresentationRequestInsecureOrigin); |
| 242 } |
| 243 } |
| 230 | 244 |
| 231 } // namespace blink | 245 } // namespace blink |
| OLD | NEW |