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

Side by Side Diff: public/platform/WebNavigatorConnectProvider.h

Issue 831613002: Add WebNavigatorConnectCallbacks typedef. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make ConnectCallbacks be declared in terms of added typedef Created 5 years, 11 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
« no previous file with comments | « Source/modules/navigatorconnect/NavigatorConnect.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 WebString;
14 class WebURL; 14 class WebURL;
15 15
16 typedef WebCallbacks<void, void> WebNavigatorConnectCallbacks;
17
16 class WebNavigatorConnectProvider { 18 class WebNavigatorConnectProvider {
17 public: 19 public:
18 virtual ~WebNavigatorConnectProvider() { } 20 virtual ~WebNavigatorConnectProvider() { }
19 21
20 // Initiates a connection from the given origin to the given URL. When 22 // Initiates a connection from the given origin to the given URL. When
21 // successful the service can communicate with the client over the given 23 // successful the service can communicate with the client over the given
22 // channel. The origin isn't passed as WebSecurityOrigin because that would 24 // channel. The origin isn't passed as WebSecurityOrigin because that would
23 // be a layering violation (platform/ code shouldn't depend on web/ code). 25 // be a layering violation (platform/ code shouldn't depend on web/ code).
24 // Ownership of the WebMessagePortChannel and WebCallbacks is transferred to the provider. 26 // Ownership of the WebMessagePortChannel and WebNavigatorConnectCallbacks
25 virtual void connect(const WebURL&, const WebString& origin, WebMessagePortC hannel*, WebCallbacks<void, void>*) { } 27 // objects are both transferred to the provider.
28 virtual void connect(const WebURL&, const WebString& origin, WebMessagePortC hannel*, WebNavigatorConnectCallbacks*) { }
26 }; 29 };
27 30
28 } // namespace blink 31 } // namespace blink
29 32
30 #endif // WebNavigatorConnectProvider_h 33 #endif // WebNavigatorConnectProvider_h
OLDNEW
« no previous file with comments | « Source/modules/navigatorconnect/NavigatorConnect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698