blob: c09e0141668ae1e597e2149cfba6613197478259 [file]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_TRUSTED_CDN_H_
#define CHROME_BROWSER_ANDROID_TRUSTED_CDN_H_
#include "base/android/scoped_java_ref.h"
#include "base/memory/raw_ptr.h"
#include "content/public/browser/web_contents.h"
// Native part of Trusted CDN publisher URL provider. Managed by Java layer.
class TrustedCdn {
public:
TrustedCdn();
~TrustedCdn();
void SetWebContents(JNIEnv* env,
const base::android::JavaRef<jobject>& jweb_contents);
void ResetWebContents(JNIEnv* env);
void OnDestroyed(JNIEnv* env);
base::android::ScopedJavaLocalRef<jobject> GetPublisherUrl(JNIEnv* env);
private:
raw_ptr<content::WebContents> web_contents_;
};
#endif // CHROME_BROWSER_ANDROID_TRUSTED_CDN_H_