| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 WebNavigatorConnectProvider_h | |
| 6 #define WebNavigatorConnectProvider_h | |
| 7 | |
| 8 #include "WebCallbacks.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class WebMessagePortChannel; | |
| 13 class WebString; | |
| 14 class WebURL; | |
| 15 | |
| 16 typedef WebCallbacks<void, void> WebNavigatorConnectCallbacks; | |
| 17 typedef WebCallbacks<WebMessagePortChannel, void> WebNavigatorConnectPortCallbac
ks; | |
| 18 | |
| 19 class WebNavigatorConnectProvider { | |
| 20 public: | |
| 21 virtual ~WebNavigatorConnectProvider() { } | |
| 22 | |
| 23 // Initiates a connection from the given origin to the given URL. When | |
| 24 // successful the service can communicate with the client over the given | |
| 25 // channel. The origin isn't passed as WebSecurityOrigin because that would | |
| 26 // be a layering violation (platform/ code shouldn't depend on web/ code). | |
| 27 // Ownership of the WebMessagePortChannel and WebNavigatorConnectCallbacks | |
| 28 // objects are both transferred to the provider. | |
| 29 virtual void connect(const WebURL&, const WebString& origin, WebNavigatorCon
nectPortCallbacks*) { } | |
| 30 }; | |
| 31 | |
| 32 } // namespace blink | |
| 33 | |
| 34 #endif // WebNavigatorConnectProvider_h | |
| OLD | NEW |