Molybden API
Loading...
Searching...
No Matches
permissions_delegates.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_PERMISSIONS_DELEGATES_HPP
6#define MOLYBDEN_PERMISSIONS_DELEGATES_HPP
7
8#include <memory>
9#include <string>
10
11#include "molybden/base/delegate.hpp"
12#include "molybden/base/delegate_action.hpp"
13
14namespace molybden {
15
16class Frame;
17enum class PermissionType;
18
26 std::shared_ptr<Frame> frame;
27
31 std::string url;
32
36 PermissionType permission_type;
37};
38
43 public:
45 std::unique_ptr<rpc::internal::Callback> callback);
46
50 void grant();
51
55 void deny();
56
65 void ask();
66};
67
91
92} // namespace molybden
93
94#endif // MOLYBDEN_PERMISSIONS_DELEGATES_HPP
The base API that implements classes which represent delegate's action.
Definition delegate_action.hpp:18
Delegates allow you to make decisions that affect the application behavior.
Definition delegate.hpp:30
A class that contains all permission delegates.
Definition permissions_delegates.hpp:71
Delegate< RequestPermissionArgs, RequestPermissionAction > onRequestPermission
Invoked when a web page requests a permission to enable some functionality such as geolocation or des...
Definition permissions_delegates.hpp:89
The PermissionsDelegates::onRequestPermission action.
Definition permissions_delegates.hpp:42
void ask()
Ask web browser to handle this permission request.
void deny()
Deny the requested permission.
void grant()
Grant the requested permission.
The PermissionsDelegates::onRequestPermission action arguments.
Definition permissions_delegates.hpp:22
PermissionType permission_type
The type of the requested permission.
Definition permissions_delegates.hpp:36
std::shared_ptr< Frame > frame
The frame that is requesting permission.
Definition permissions_delegates.hpp:26
std::string url
The URL of the currently loaded web page that is requesting permission.
Definition permissions_delegates.hpp:31