Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ServicePortCollection_h | |
| 6 #define ServicePortCollection_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromise.h" | |
| 9 #include "core/dom/ContextLifecycleObserver.h" | |
| 10 #include "core/events/EventTarget.h" | |
| 11 #include "modules/ModulesExport.h" | |
| 12 #include "wtf/RefCounted.h" | |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 class ServicePortConnectOptions; | |
| 17 class ServicePortMatchOptions; | |
| 18 | |
| 19 class MODULES_EXPORT ServicePortCollection final | |
| 20 : public EventTargetWithInlineData | |
| 21 , public RefCountedWillBeNoBase<ServicePortCollection> | |
| 22 , public ContextLifecycleObserver { | |
| 23 DEFINE_WRAPPERTYPEINFO(); | |
| 24 REFCOUNTED_EVENT_TARGET(ServicePortCollection); | |
| 25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ServicePortCollection); | |
| 26 WTF_MAKE_NONCOPYABLE(ServicePortCollection); | |
| 27 public: | |
| 28 static PassRefPtrWillBeRawPtr<ServicePortCollection> create(ExecutionContext *); | |
| 29 virtual ~ServicePortCollection(); | |
|
tkent
2015/06/23 23:54:48
nit: remove |virtual|, and add |override|.
Marijn Kruisselbrink
2015/06/24 00:26:52
done
| |
| 30 | |
| 31 // ServicePortCollection.idl | |
| 32 ScriptPromise connect(ScriptState*, const String& url, const ServicePortConn ectOptions&); | |
| 33 ScriptPromise match(ScriptState*, const ServicePortMatchOptions&); | |
| 34 ScriptPromise matchAll(ScriptState*, const ServicePortMatchOptions&); | |
| 35 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); | |
| 36 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | |
| 37 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); | |
| 38 | |
| 39 // EventTarget overrides. | |
| 40 const AtomicString& interfaceName() const override; | |
| 41 ExecutionContext* executionContext() const override; | |
| 42 | |
| 43 DECLARE_VIRTUAL_TRACE(); | |
| 44 | |
| 45 private: | |
| 46 explicit ServicePortCollection(ExecutionContext*); | |
| 47 }; | |
| 48 | |
| 49 } // namespace blink | |
| 50 | |
| 51 #endif // ServicePortCollection_h | |
| OLD | NEW |