Chromium Code Reviews| 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/PresentationReceiver.h" | 5 #include "modules/presentation/PresentationReceiver.h" |
| 6 #include "modules/presentation/PresentationConnectionList.h" | |
| 6 | 7 |
| 7 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 8 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
| 9 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| 10 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
| 11 #include "core/frame/LocalFrame.h" | 12 #include "core/frame/LocalFrame.h" |
| 12 #include "modules/EventTargetModules.h" | 13 #include "modules/EventTargetModules.h" |
|
mlamouri (slow - plz ping)
2016/08/24 16:48:59
You might want to clean up the list of includes.
zhaobin
2016/08/24 17:34:12
Done.
| |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 | 16 |
| 16 PresentationReceiver::PresentationReceiver(LocalFrame* frame) | 17 PresentationReceiver::PresentationReceiver(LocalFrame* frame) |
| 17 : DOMWindowProperty(frame) | 18 : DOMWindowProperty(frame) |
| 18 { | 19 { |
| 19 } | 20 } |
| 20 | 21 |
| 21 const AtomicString& PresentationReceiver::interfaceName() const | 22 ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState) |
| 22 { | 23 { |
| 23 return EventTargetNames::PresentationReceiver; | 24 return ScriptPromise::rejectWithDOMException(scriptState, DOMException::crea te(NotSupportedError, "PresentationReceiver::connectionList() is not implemented yet.")); |
| 24 } | |
| 25 | |
| 26 ExecutionContext* PresentationReceiver::getExecutionContext() const | |
| 27 { | |
| 28 return frame() ? frame()->document() : nullptr; | |
| 29 } | |
| 30 | |
| 31 ScriptPromise PresentationReceiver::getConnection(ScriptState* scriptState) | |
| 32 { | |
| 33 return ScriptPromise::rejectWithDOMException(scriptState, DOMException::crea te(NotSupportedError, "PresentationReceiver::getConnection() is not implemented yet.")); | |
| 34 } | |
| 35 | |
| 36 ScriptPromise PresentationReceiver::getConnections(ScriptState* scriptState) | |
| 37 { | |
| 38 return ScriptPromise::rejectWithDOMException(scriptState, DOMException::crea te(NotSupportedError, "PresentationReceiver::getConnections() is not implemented yet.")); | |
| 39 } | 25 } |
| 40 | 26 |
| 41 DEFINE_TRACE(PresentationReceiver) | 27 DEFINE_TRACE(PresentationReceiver) |
| 42 { | 28 { |
| 43 EventTargetWithInlineData::trace(visitor); | |
| 44 DOMWindowProperty::trace(visitor); | 29 DOMWindowProperty::trace(visitor); |
| 45 } | 30 } |
| 46 | 31 |
| 47 } // namespace blink | 32 } // namespace blink |
| OLD | NEW |