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

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

Issue 1210633002: Update navigator.services API to use the new services.onconnect event [1/3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@serviceport-part3
Patch Set: rebase Created 5 years, 5 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 #ifndef ServicePortCollection_h 5 #ifndef ServicePortCollection_h
6 #define ServicePortCollection_h 6 #define ServicePortCollection_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "core/dom/ContextLifecycleObserver.h" 9 #include "core/dom/ContextLifecycleObserver.h"
10 #include "core/events/EventTarget.h" 10 #include "core/events/EventTarget.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 #include "public/platform/modules/navigator_services/WebServicePortCallbacks.h"
13 #include "public/platform/modules/navigator_services/WebServicePortProvider.h" 14 #include "public/platform/modules/navigator_services/WebServicePortProvider.h"
14 #include "public/platform/modules/navigator_services/WebServicePortProviderClien t.h" 15 #include "public/platform/modules/navigator_services/WebServicePortProviderClien t.h"
15 #include "wtf/RefCounted.h" 16 #include "wtf/RefCounted.h"
16 17
17 namespace blink { 18 namespace blink {
18 19
19 class ServicePort; 20 class ServicePort;
20 class ServicePortConnectOptions; 21 class ServicePortConnectOptions;
21 class ServicePortMatchOptions; 22 class ServicePortMatchOptions;
22 23
(...skipping 27 matching lines...) Expand all
50 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
51 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); 52 DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
52 53
53 // EventTarget overrides. 54 // EventTarget overrides.
54 const AtomicString& interfaceName() const override; 55 const AtomicString& interfaceName() const override;
55 ExecutionContext* executionContext() const override; 56 ExecutionContext* executionContext() const override;
56 57
57 // WebServicePortProviderClient overrides. 58 // WebServicePortProviderClient overrides.
58 void postMessage(WebServicePortID, const WebString&, const WebMessagePortCha nnelArray&) override; 59 void postMessage(WebServicePortID, const WebString&, const WebMessagePortCha nnelArray&) override;
59 60
61 void dispatchConnectEvent(PassOwnPtr<WebServicePortConnectEventCallbacks>, c onst WebURL& targetURL, const WebString& origin, WebServicePortID);
62
60 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
61 64
62 private: 65 private:
63 explicit ServicePortCollection(ExecutionContext*); 66 explicit ServicePortCollection(ExecutionContext*);
64 67
65 OwnPtr<WebServicePortProvider> m_provider; 68 OwnPtr<WebServicePortProvider> m_provider;
66 HeapVector<Member<ServicePort>> m_ports; 69 HeapVector<Member<ServicePort>> m_ports;
67 }; 70 };
68 71
69 } // namespace blink 72 } // namespace blink
70 73
71 #endif // ServicePortCollection_h 74 #endif // ServicePortCollection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698