blob: c4a2daacec799e3e1227e2520a7956435c67bed3 [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
Daniel Cheng1ed740a2025-06-19 18:48:485#include "chrome/browser/platform_util.h"
6
qinmind4599b42015-09-08 20:06:207#include <jni.h>
8
9#include "base/android/jni_android.h"
10#include "base/android/jni_string.h"
Daniel Cheng1ed740a2025-06-19 18:48:4811#include "base/notimplemented.h"
jaekyune4f9eed2015-02-24 02:06:5812#include "ui/android/view_android.h"
Christoph Schweringa1ea47fae2022-03-10 02:09:5313#include "ui/android/window_android.h"
qinmind4599b42015-09-08 20:06:2014#include "url/gurl.h"
[email protected]efad6642012-02-28 03:42:4215
Andrew Grieveecb885bb2024-05-29 18:14:1916// Must come after all headers that specialize FromJniType() / ToJniType().
17#include "chrome/browser/util/jni_headers/PlatformUtil_jni.h"
18
torne86560112016-08-04 15:59:0419using base::android::ScopedJavaLocalRef;
20
[email protected]efad6642012-02-28 03:42:4221namespace platform_util {
22
23// TODO: crbug/115682 to track implementation of the following methods.
24
[email protected]4d225de12013-12-13 09:29:1725void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
[email protected]efad6642012-02-28 03:42:4226 NOTIMPLEMENTED();
27}
28
asanka655d1112015-03-07 05:33:4129void OpenItem(Profile* profile,
30 const base::FilePath& full_path,
31 OpenItemType item_type,
Alexander Cooper71fa2b02020-07-16 17:49:3632 OpenOperationCallback callback) {
[email protected]efad6642012-02-28 03:42:4233 NOTIMPLEMENTED();
34}
35
David Rogerd283a172022-10-06 10:01:1536void OpenExternal(const GURL& url) {
qinmind4599b42015-09-08 20:06:2037 JNIEnv* env = base::android::AttachCurrentThread();
38 ScopedJavaLocalRef<jstring> j_url =
39 base::android::ConvertUTF8ToJavaString(env, url.spec());
torne948f3662016-08-16 15:10:4440 Java_PlatformUtil_launchExternalProtocol(env, j_url);
[email protected]efad6642012-02-28 03:42:4241}
42
43gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
44 NOTIMPLEMENTED();
[email protected]2d02a2002012-09-18 21:47:5645 return view->GetWindowAndroid();
[email protected]efad6642012-02-28 03:42:4246}
47
48gfx::NativeView GetParent(gfx::NativeView view) {
49 NOTIMPLEMENTED();
50 return view;
51}
52
53bool IsWindowActive(gfx::NativeWindow window) {
54 NOTIMPLEMENTED();
55 return false;
56}
57
58void ActivateWindow(gfx::NativeWindow window) {
59 NOTIMPLEMENTED();
60}
61
62bool IsVisible(gfx::NativeView view) {
63 NOTIMPLEMENTED();
64 return true;
65}
66
67} // namespace platform_util