Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp

Issue 2265363002: [Presentation API] make PresentationReceiver API consistent with latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve code review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698