1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
content / public / browser / private_network_device_delegate.h [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_BROWSER_PRIVATE_NETWORK_DEVICE_DELEGATE_H_
#define CONTENT_PUBLIC_BROWSER_PRIVATE_NETWORK_DEVICE_DELEGATE_H_
#include "base/functional/callback.h"
#include "content/common/content_export.h"
#include "third_party/blink/public/mojom/private_network_device/private_network_device.mojom.h"
namespace content {
class RenderFrameHost;
// Interface provided by the content embedder to support the private network
// access user permission.
class CONTENT_EXPORT PrivateNetworkDeviceDelegate {
public:
virtual ~PrivateNetworkDeviceDelegate() = default;
// Request permission for the Private Network Device.
// |callback| accepts a bool specifying whether the user granted permission.
//
// TODO(crbug.com/40272624): Check if there's permission in the storage
// already. If not, show the chooser.
virtual void RequestPermission(RenderFrameHost& frame,
blink::mojom::PrivateNetworkDevicePtr device,
base::OnceCallback<void(bool)> callback) = 0;
};
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_PRIVATE_NETWORK_DEVICE_DELEGATE_H_