blob: 86646af69d70622baa40268b2204bdc0d68f4c33 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <vector>
#include "base/callback.h"
#include "content/common/content_export.h"
namespace content {
class PepperVpnProviderResourceHostProxy;
// Describes interface for communication with an external VpnService.
// All the methods below can only be called on the UI thread.
class CONTENT_EXPORT VpnServiceProxy {
using SuccessCallback = base::Closure;
using FailureCallback =
base::Callback<void(const std::string& error_name,
const std::string& error_message)>;
virtual ~VpnServiceProxy() {}
// Binds an existing VPN connection in the VpnService. Registers with the
// VpnService the Resource host back-end.
virtual void Bind(const std::string& host_id,
const std::string& configuration_id,
const std::string& configuration_name,
const SuccessCallback& success,
const FailureCallback& failure,
pepper_vpn_provider_proxy) = 0;
// Sends an IP packet to the VpnService.
virtual void SendPacket(const std::string& host_id,
const std::vector<char>& data,
const SuccessCallback& success,
const FailureCallback& failure) = 0;
} // namespace content