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

Side by Side Diff: content/public/browser/vpn_service_proxy.h

Issue 1988613005: ppapi: PPB_VpnProvider: Implement Service Helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vpn-permission
Patch Set: Pass VpnServiceProxy using unique_ptr. Created 4 years, 6 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
(Empty)
1 // Copyright 2016 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 CONTENT_PUBLIC_BROWSER_VPN_SERVICE_PROXY_H_
6 #define CONTENT_PUBLIC_BROWSER_VPN_SERVICE_PROXY_H_
7
8 #include <memory>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "content/common/content_export.h"
13
14 namespace content {
15 class PepperVpnProviderResourceHostProxy;
16
17 // Describes interface for communication with an external VpnService.
18 // All the methods below can only be called on the UI thread.
19 class CONTENT_EXPORT VpnServiceProxy {
20 public:
21 using SuccessCallback = base::Closure;
22 using FailureCallback =
23 base::Callback<void(const std::string& error_name,
24 const std::string& error_message)>;
25
26 // Binds an existing VPN connection in the VpnService. Registers with the
27 // VpnService the Resource host back-end.
28 virtual void Bind(const std::string& host_id,
29 const std::string& configuration_id,
30 const std::string& configuration_name,
31 const SuccessCallback& success,
32 const FailureCallback& failure,
33 std::unique_ptr<PepperVpnProviderResourceHostProxy>) = 0;
ncarter (slow) 2016/06/20 20:03:25 The last parameter should have a name.
adrian.belgun 2016/06/21 08:08:16 Done.
34
35 // Sends an IP packet to the VpnService.
36 virtual void SendPacket(const std::string& host_id,
37 const std::vector<char>& data,
38 const SuccessCallback& success,
39 const FailureCallback& failure) = 0;
40
41 virtual ~VpnServiceProxy() {}
ncarter (slow) 2016/06/20 20:01:55 dtor should be declared before Bind(), and after t
adrian.belgun 2016/06/21 08:08:16 Done.
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_PUBLIC_BROWSER_VPN_SERVICE_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698