| OLD | NEW |
| 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/PresentationAvailability.h" | 5 #include "modules/presentation/PresentationAvailability.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/events/Event.h" | 9 #include "core/events/Event.h" |
| 10 #include "core/frame/UseCounter.h" | 10 #include "core/frame/UseCounter.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 return nullptr; | 26 return nullptr; |
| 27 PresentationController* controller = | 27 PresentationController* controller = |
| 28 PresentationController::from(*document->frame()); | 28 PresentationController::from(*document->frame()); |
| 29 return controller ? controller->client() : nullptr; | 29 return controller ? controller->client() : nullptr; |
| 30 } | 30 } |
| 31 | 31 |
| 32 } // anonymous namespace | 32 } // anonymous namespace |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 PresentationAvailability* PresentationAvailability::take( | 35 PresentationAvailability* PresentationAvailability::take( |
| 36 ScriptPromiseResolver* resolver, | 36 PresentationAvailabilityProperty* resolver, |
| 37 const KURL& url, | 37 const KURL& url, |
| 38 bool value) { | 38 bool value) { |
| 39 PresentationAvailability* presentationAvailability = | 39 PresentationAvailability* presentationAvailability = |
| 40 new PresentationAvailability(resolver->getExecutionContext(), url, value); | 40 new PresentationAvailability(resolver->getExecutionContext(), url, value); |
| 41 presentationAvailability->suspendIfNeeded(); | 41 presentationAvailability->suspendIfNeeded(); |
| 42 presentationAvailability->updateListening(); | 42 presentationAvailability->updateListening(); |
| 43 return presentationAvailability; | 43 return presentationAvailability; |
| 44 } | 44 } |
| 45 | 45 |
| 46 PresentationAvailability::PresentationAvailability( | 46 PresentationAvailability::PresentationAvailability( |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return m_value; | 130 return m_value; |
| 131 } | 131 } |
| 132 | 132 |
| 133 DEFINE_TRACE(PresentationAvailability) { | 133 DEFINE_TRACE(PresentationAvailability) { |
| 134 EventTargetWithInlineData::trace(visitor); | 134 EventTargetWithInlineData::trace(visitor); |
| 135 PageVisibilityObserver::trace(visitor); | 135 PageVisibilityObserver::trace(visitor); |
| 136 SuspendableObject::trace(visitor); | 136 SuspendableObject::trace(visitor); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace blink | 139 } // namespace blink |
| OLD | NEW |