summaryrefslogtreecommitdiff
path: root/chromium/url/android/gurl_android.h
blob: 7113a010340e03e1fc6c0ea534de16ff12e36699 (plain)
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
// Copyright 2019 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 URL_ANDROID_GURL_ANDROID_H_
#define URL_ANDROID_GURL_ANDROID_H_

#include <memory>

#include "base/android/scoped_java_ref.h"
#include "url/gurl.h"

namespace url {

class GURLAndroid {
 public:
  static std::unique_ptr<GURL> ToNativeGURL(
      JNIEnv* env,
      const base::android::JavaRef<jobject>& j_gurl);
  static base::android::ScopedJavaLocalRef<jobject> FromNativeGURL(
      JNIEnv* env,
      const GURL& gurl);
  static base::android::ScopedJavaLocalRef<jobject> EmptyGURL(JNIEnv* env);
};

}  // namespace url

#endif  // URL_ANDROID_GURL_ANDROID_H_