Index: Source/modules/presentation/Presentation.cpp |
diff --git a/Source/modules/presentation/Presentation.cpp b/Source/modules/presentation/Presentation.cpp |
index ac51b38c087e64c80392ae94541bbdba7c3269fa..387887bdbeddf3ea6a88a4eff70022bc9e8d7773 100644 |
--- a/Source/modules/presentation/Presentation.cpp |
+++ b/Source/modules/presentation/Presentation.cpp |
@@ -5,6 +5,8 @@ |
#include "config.h" |
#include "modules/presentation/Presentation.h" |
+#include "bindings/core/v8/ScriptPromise.h" |
Peter Beverloo
2014/10/29 20:51:19
You already include this in the header.
whywhat
2014/10/29 22:09:26
IWYU (include what you use)
|
+#include "bindings/core/v8/ScriptPromiseResolver.h" |
#include "modules/EventTargetModules.h" |
Peter Beverloo
2014/10/29 20:51:19
+#include "core/dom/DOMException.h"
whywhat
2014/10/29 22:09:26
Done.
|
namespace blink { |
@@ -39,4 +41,27 @@ void Presentation::trace(Visitor* visitor) |
EventTargetWithInlineData::trace(visitor); |
} |
+PresentationSession* Presentation::session() const |
+{ |
+ return m_session.get(); |
Peter Beverloo
2014/10/29 20:51:19
visitor->trace(m_session);
whywhat
2014/10/29 22:09:26
Done.
|
+} |
+ |
+ScriptPromise Presentation::startSession(ScriptState* state, const String& senderId, const String& presentationId) |
+{ |
+ RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state); |
+ ScriptPromise promise = resolver->promise(); |
+ RefPtrWillBeRawPtr<DOMException> exception = DOMException::create(NotSupportedError, "The method is not supported yet."); |
+ resolver->reject(exception); |
+ return promise; |
+} |
+ |
+ScriptPromise Presentation::joinSession(ScriptState* state, const String& senderId, const String& presentationId) |
+{ |
+ RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state); |
+ ScriptPromise promise = resolver->promise(); |
+ RefPtrWillBeRawPtr<DOMException> exception = DOMException::create(NotSupportedError, "The method is not supported yet."); |
+ resolver->reject(exception); |
Peter Beverloo
2014/10/29 20:51:19
Just call DOMException::create() as part of this c
whywhat
2014/10/29 22:09:26
Done.
|
+ return promise; |
+} |
+ |
} // namespace blink |