blob: 05a80ff4dc7a1de44bd9c9dded309984d43e83a9 [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2012 The Chromium Authors
[email protected]efad6642012-02-28 03:42:422// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
qinmind4599b42015-09-08 20:06:205#include <jni.h>
6
7#include "base/android/jni_android.h"
8#include "base/android/jni_string.h"
Hans Wennborg1790e6b2020-04-24 19:10:339#include "base/notreached.h"
[email protected]efad6642012-02-28 03:42:4210#include "chrome/browser/platform_util.h"
jaekyune4f9eed2015-02-24 02:06:5811#include "ui/android/view_android.h"
Christoph Schweringa1ea47fae2022-03-10 02:09:5312#include "ui/android/window_android.h"
qinmind4599b42015-09-08 20:06:2013#include "url/gurl.h"
[email protected]efad6642012-02-28 03:42:4214
Andrew Grieveecb885bb2024-05-29 18:14:1915// Must come after all headers that specialize FromJniType() / ToJniType().
16#include "chrome/browser/util/jni_headers/PlatformUtil_jni.h"
17
torne86560112016-08-04 15:59:0418using base::android::ScopedJavaLocalRef;
19
[email protected]efad6642012-02-28 03:42:4220namespace platform_util {
21
22// TODO: crbug/115682 to track implementation of the following methods.
23
[email protected]4d225de12013-12-13 09:29:1724void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
[email protected]efad6642012-02-28 03:42:4225 NOTIMPLEMENTED();
26}
27
asanka655d1112015-03-07 05:33:4128void OpenItem(Profile* profile,
29 const base::FilePath& full_path,
30 OpenItemType item_type,
Alexander Cooper71fa2b02020-07-16 17:49:3631 OpenOperationCallback callback) {
[email protected]efad6642012-02-28 03:42:4232 NOTIMPLEMENTED();
33}
34
David Rogerd283a172022-10-06 10:01:1535void OpenExternal(const GURL& url) {
qinmind4599b42015-09-08 20:06:2036 JNIEnv* env = base::android::AttachCurrentThread();
37 ScopedJavaLocalRef<jstring> j_url =
38 base::android::ConvertUTF8ToJavaString(env, url.spec());
torne948f3662016-08-16 15:10:44