mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-03 03:17:55 +01:00
- Implement CefRequestHandler::OnBeforeBrowse using NavigationThrottle instead of ResourceThrottle (see http://crbug.com/537634). The CefRequest object passed to OnBeforeBrowse will no longer have an associated request identifier. - Mac: Remove additional helper apps which are no longer required (see http://crbug.com/520680) - Remove the UR_FLAG_REPORT_RAW_HEADERS flag which is no longer supported (see http://crbug.com/517114) - Remove the CefBrowserSettings.java parameter. Java is an NPAPI plugin and NPAPI plugins are no longer supported (see http://crbug.com/470301#c11) - Add CefFormatUrlForSecurityDisplay function in cef_parser.h - Fix crash when passing `--disable-extensions` command-line flag (issue #1721) - Linux: Fix NSS handler loading (issue #1727)
52 lines
2.0 KiB
C++
52 lines
2.0 KiB
C++
// Copyright 2015 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.
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_PERMISSION_MANAGER_H_
|
|
#define CEF_LIBCEF_BROWSER_PERMISSION_MANAGER_H_
|
|
|
|
#include "base/callback_forward.h"
|
|
#include "base/id_map.h"
|
|
#include "base/macros.h"
|
|
#include "content/public/browser/permission_manager.h"
|
|
|
|
class CefPermissionManager : public content::PermissionManager {
|
|
public:
|
|
CefPermissionManager();
|
|
~CefPermissionManager() override;
|
|
|
|
// PermissionManager implementation.
|
|
int RequestPermission(
|
|
content::PermissionType permission,
|
|
content::RenderFrameHost* render_frame_host,
|
|
const GURL& requesting_origin,
|
|
bool user_gesture,
|
|
const base::Callback<void(content::PermissionStatus)>& callback) override;
|
|
void CancelPermissionRequest(int request_id) override;
|
|
void ResetPermission(content::PermissionType permission,
|
|
const GURL& requesting_origin,
|
|
const GURL& embedding_origin) override;
|
|
content::PermissionStatus GetPermissionStatus(
|
|
content::PermissionType permission,
|
|
const GURL& requesting_origin,
|
|
const GURL& embedding_origin) override;
|
|
void RegisterPermissionUsage(content::PermissionType permission,
|
|
const GURL& requesting_origin,
|
|
const GURL& embedding_origin) override;
|
|
int SubscribePermissionStatusChange(
|
|
content::PermissionType permission,
|
|
const GURL& requesting_origin,
|
|
const GURL& embedding_origin,
|
|
const base::Callback<void(content::PermissionStatus)>& callback) override;
|
|
void UnsubscribePermissionStatusChange(int subscription_id) override;
|
|
|
|
private:
|
|
struct PendingRequest;
|
|
using PendingRequestsMap = IDMap<PendingRequest, IDMapOwnPointer>;
|
|
PendingRequestsMap pending_requests_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefPermissionManager);
|
|
};
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_PERMISSION_MANAGER_H_
|