forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcookie_access_filter.h
More file actions
37 lines (29 loc) · 1.23 KB
/
cookie_access_filter.h
File metadata and controls
37 lines (29 loc) · 1.23 KB
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
35
36
37
// Copyright (c) 2019 The Chromium Embedded Framework 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 JCEF_NATIVE_COOKIE_ACCESS_FILTER_H_
#define JCEF_NATIVE_COOKIE_ACCESS_FILTER_H_
#pragma once
#include <jni.h>
#include "include/cef_resource_request_handler.h"
#include "jni_scoped_helpers.h"
// CookieAccessFilter implementation.
class CookieAccessFilter : public CefCookieAccessFilter {
public:
CookieAccessFilter(JNIEnv* env, jobject handler);
// CefCookieAccessFilter methods:
bool CanSendCookie(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
const CefCookie& cookie) override;
bool CanSaveCookie(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefResponse> response,
const CefCookie& cookie) override;
protected:
ScopedJNIObjectGlobal handle_;
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(CookieAccessFilter);
};
#endif // JCEF_NATIVE_COOKIE_ACCESS_FILTER_H_