| 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/PresentationConnectionCallbacks.h" | 5 #include "modules/presentation/PresentationConnectionCallbacks.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "core/dom/DOMException.h" |
| 8 #include "modules/presentation/PresentationConnection.h" | 9 #include "modules/presentation/PresentationConnection.h" |
| 9 #include "modules/presentation/PresentationError.h" | 10 #include "modules/presentation/PresentationError.h" |
| 10 #include "modules/presentation/PresentationRequest.h" | 11 #include "modules/presentation/PresentationRequest.h" |
| 11 #include "public/platform/modules/presentation/WebPresentationConnectionClient.h
" | 12 #include "public/platform/modules/presentation/WebPresentationConnectionClient.h
" |
| 12 #include "public/platform/modules/presentation/WebPresentationError.h" | 13 #include "public/platform/modules/presentation/WebPresentationError.h" |
| 13 #include "wtf/PtrUtil.h" | 14 #include "wtf/PtrUtil.h" |
| 14 #include <memory> | 15 #include <memory> |
| 15 | 16 |
| 16 namespace blink { | 17 namespace blink { |
| 17 | 18 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 33 } | 34 } |
| 34 | 35 |
| 35 void PresentationConnectionCallbacks::onError(const WebPresentationError& error) | 36 void PresentationConnectionCallbacks::onError(const WebPresentationError& error) |
| 36 { | 37 { |
| 37 if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()-
>activeDOMObjectsAreStopped()) | 38 if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()-
>activeDOMObjectsAreStopped()) |
| 38 return; | 39 return; |
| 39 m_resolver->reject(PresentationError::take(m_resolver.get(), error)); | 40 m_resolver->reject(PresentationError::take(m_resolver.get(), error)); |
| 40 } | 41 } |
| 41 | 42 |
| 42 } // namespace blink | 43 } // namespace blink |
| OLD | NEW |