| 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 "config.h" | 5 #include "config.h" |
| 6 #include "modules/presentation/Presentation.h" | 6 #include "modules/presentation/Presentation.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 EventTargetWithInlineData::trace(visitor); | 45 EventTargetWithInlineData::trace(visitor); |
| 46 } | 46 } |
| 47 | 47 |
| 48 PresentationSession* Presentation::session() const | 48 PresentationSession* Presentation::session() const |
| 49 { | 49 { |
| 50 return m_session.get(); | 50 return m_session.get(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 ScriptPromise Presentation::startSession(ScriptState* state, const String& sende
rId, const String& presentationId) | 53 ScriptPromise Presentation::startSession(ScriptState* state, const String& sende
rId, const String& presentationId) |
| 54 { | 54 { |
| 55 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state
); | 55 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(state); |
| 56 ScriptPromise promise = resolver->promise(); | 56 ScriptPromise promise = resolver->promise(); |
| 57 resolver->reject(DOMException::create(NotSupportedError, "The method is not
supported yet.")); | 57 resolver->reject(DOMException::create(NotSupportedError, "The method is not
supported yet.")); |
| 58 return promise; | 58 return promise; |
| 59 } | 59 } |
| 60 | 60 |
| 61 ScriptPromise Presentation::joinSession(ScriptState* state, const String& sender
Id, const String& presentationId) | 61 ScriptPromise Presentation::joinSession(ScriptState* state, const String& sender
Id, const String& presentationId) |
| 62 { | 62 { |
| 63 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state
); | 63 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(state); |
| 64 ScriptPromise promise = resolver->promise(); | 64 ScriptPromise promise = resolver->promise(); |
| 65 resolver->reject(DOMException::create(NotSupportedError, "The method is not
supported yet.")); | 65 resolver->reject(DOMException::create(NotSupportedError, "The method is not
supported yet.")); |
| 66 return promise; | 66 return promise; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |