blob: 8b073d56234df5d004ef9fed99c1cdbfa514e136 [file] [log] [blame]
[email protected]efad6642012-02-28 03:42:421// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// 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"
Henrique Nakashima1d8cf4e2019-10-24 22:31:3811#include "chrome/browser/util/jni_headers/PlatformUtil_jni.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
torne86560112016-08-04 15:59:0416using base::android::ScopedJavaLocalRef;
17
[email protected]efad6642012-02-28 03:42:4218namespace platform_util {
19
20// TODO: crbug/115682 to track implementation of the following methods.
21
[email protected]4d225de12013-12-13 09:29:1722void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
[email protected]efad6642012-02-28 03:42:4223 NOTIMPLEMENTED();
24}
25
asanka655d1112015-03-07 05:33:4126void OpenItem(Profile* profile,
27 const base::FilePath& full_path,
28 OpenItemType item_type,
Alexander Cooper71fa2b02020-07-16 17:49:3629 OpenOperationCallback callback) {
[email protected]efad6642012-02-28 03:42:4230 NOTIMPLEMENTED();
31}
32
[email protected]7f0a3efa2013-12-12 17:16:1233void OpenExternal(Profile* profile, const GURL& url) {
qinmind4599b42015-09-08 20:06:2034 JNIEnv* env = base::android::AttachCurrentThread();
35 ScopedJavaLocalRef<jstring> j_url =
36 base::android::ConvertUTF8ToJavaString(env, url.spec());
torne948f3662016-08-16 15:10:4437 Java_PlatformUtil_launchExternalProtocol(env, j_url);
[email protected]efad6642012-02-28 03:42:4238}
39
40gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
41 NOTIMPLEMENTED();
[email protected]2d02a2002012-09-18 21:47:5642 return view->GetWindowAndroid();
[email protected]efad6642012-02-28 03:42:4243}
44
45gfx::NativeView GetParent(gfx::NativeView view) {
46 NOTIMPLEMENTED();
47 return view;
48}
49
50bool IsWindowActive(gfx::NativeWindow window) {
51 NOTIMPLEMENTED();
52 return false;
53}
54
55void ActivateWindow(gfx::NativeWindow window) {
56 NOTIMPLEMENTED();
57}
58
59bool IsVisible(gfx::NativeView view) {
60 NOTIMPLEMENTED();
61 return true;
62}
63
64} // namespace platform_util