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" |
11 #include "core/dom/DOMException.h" | 11 #include "core/dom/DOMException.h" |
| 12 #include "core/dom/ExceptionCode.h" |
12 #include "modules/EventTargetModules.h" | 13 #include "modules/EventTargetModules.h" |
13 | 14 |
14 namespace blink { | 15 namespace blink { |
15 | 16 |
16 Presentation::Presentation(ExecutionContext* executionContext) | 17 Presentation::Presentation(ExecutionContext* executionContext) |
17 : ContextLifecycleObserver(executionContext) | 18 : ContextLifecycleObserver(executionContext) |
18 { | 19 { |
19 } | 20 } |
20 | 21 |
21 Presentation::~Presentation() | 22 Presentation::~Presentation() |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 60 |
60 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) |
61 { | 62 { |
62 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state
); | 63 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state
); |
63 ScriptPromise promise = resolver->promise(); | 64 ScriptPromise promise = resolver->promise(); |
64 resolver->reject(DOMException::create(NotSupportedError, "The method is not
supported yet.")); | 65 resolver->reject(DOMException::create(NotSupportedError, "The method is not
supported yet.")); |
65 return promise; | 66 return promise; |
66 } | 67 } |
67 | 68 |
68 } // namespace blink | 69 } // namespace blink |
OLD | NEW |