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

Unified Diff: Source/modules/navigatorconnect/ServicePortCollection.cpp

Issue 1192913003: Start implementing new navigator.connect API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/navigatorconnect/ServicePortCollection.cpp
diff --git a/Source/modules/navigatorconnect/ServicePortCollection.cpp b/Source/modules/navigatorconnect/ServicePortCollection.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..96cb8268d20feb0bfe66bc34d46e7bf95c573185
--- /dev/null
+++ b/Source/modules/navigatorconnect/ServicePortCollection.cpp
@@ -0,0 +1,59 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "modules/navigatorconnect/ServicePortCollection.h"
+
+#include "core/dom/DOMException.h"
+#include "core/dom/ExceptionCode.h"
+#include "modules/EventTargetModules.h"
+
+namespace blink {
+
+PassRefPtrWillBeRawPtr<ServicePortCollection> ServicePortCollection::create(ExecutionContext* context)
+{
+ return adoptRefWillBeNoop(new ServicePortCollection(context));
+}
+
+ServicePortCollection::ServicePortCollection(ExecutionContext* context)
scheib 2015/06/23 03:57:21 Method definitions in the corresponding .cc file s
Marijn Kruisselbrink 2015/06/23 04:11:05 Done
+ : ContextLifecycleObserver(context)
+{
+}
+
+ServicePortCollection::~ServicePortCollection()
+{
+}
+
+ScriptPromise ServicePortCollection::connect(ScriptState* scriptState, const String& url, const ServicePortConnectOptions& options)
+{
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
+}
+
+ScriptPromise ServicePortCollection::match(ScriptState* scriptState, const ServicePortMatchOptions& options)
+{
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
+}
+
+ScriptPromise ServicePortCollection::matchAll(ScriptState* scriptState, const ServicePortMatchOptions& options)
+{
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
+}
+
+const AtomicString& ServicePortCollection::interfaceName() const
+{
+ return EventTargetNames::ServicePortCollection;
scheib 2015/06/23 03:57:21 Doesn't seem to be defined.
Marijn Kruisselbrink 2015/06/23 04:11:05 It compiles (see trybots), so obviously it is defi
+}
+
+ExecutionContext* ServicePortCollection::executionContext() const
+{
+ return ContextLifecycleObserver::executionContext();
+}
+
+DEFINE_TRACE(ServicePortCollection)
+{
+ EventTargetWithInlineData::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698