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

Side by Side Diff: Source/modules/navigatorconnect/ServicePortCollection.h

Issue 1192913003: Start implementing new navigator.connect API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: override instead of virtual 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 unified diff | Download patch
OLDNEW
(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
haraken 2015/06/24 01:18:46 Nit: We can move this to Oilpan's heap. The oilpan
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 ~ServicePortCollection() override;
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698