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