OLD | NEW |
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 WebServicePortProvider_h | 5 #ifndef WebServicePortProvider_h |
6 #define WebServicePortProvider_h | 6 #define WebServicePortProvider_h |
7 | 7 |
8 #include "public/platform/WebCallbacks.h" | |
9 #include "public/platform/WebMessagePortChannel.h" | 8 #include "public/platform/WebMessagePortChannel.h" |
10 #include "public/platform/WebVector.h" | 9 #include "public/platform/WebVector.h" |
11 #include "public/platform/modules/navigator_services/WebServicePort.h" | 10 #include "public/platform/modules/navigator_services/WebServicePort.h" |
| 11 #include "public/platform/modules/navigator_services/WebServicePortCallbacks.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class WebString; | 15 class WebString; |
16 class WebURL; | 16 class WebURL; |
17 | 17 |
18 using WebServicePortConnectCallbacks = WebCallbacks<WebServicePortID, void>; | |
19 | 18 |
20 // One instance of this class is associated with each ServicePortCollection. | 19 // One instance of this class is associated with each ServicePortCollection. |
21 // When a ServicePortCollection is destroyed the WebServicePortProvider | 20 // When a ServicePortCollection is destroyed the WebServicePortProvider |
22 // associated with it is also destroyed. All communication from ServicePorts and | 21 // associated with it is also destroyed. All communication from ServicePorts and |
23 // the ServicePortCollection to embedding code goes via this interface. | 22 // the ServicePortCollection to embedding code goes via this interface. |
24 class WebServicePortProvider { | 23 class WebServicePortProvider { |
25 public: | 24 public: |
26 virtual void destroy() { BLINK_ASSERT_NOT_REACHED(); } | 25 virtual void destroy() { BLINK_ASSERT_NOT_REACHED(); } |
27 | 26 |
28 // Initiates a connection from the given origin to the given URL. When | 27 // Initiates a connection from the given origin to the given URL. When |
(...skipping 30 matching lines...) Expand all Loading... |
59 if (provider) | 58 if (provider) |
60 provider->destroy(); | 59 provider->destroy(); |
61 } | 60 } |
62 }; | 61 }; |
63 | 62 |
64 } // namespace WTF | 63 } // namespace WTF |
65 | 64 |
66 #endif // INSIDE_BLINK | 65 #endif // INSIDE_BLINK |
67 | 66 |
68 #endif // WebServicePortProvider_h | 67 #endif // WebServicePortProvider_h |
OLD | NEW |