blob: 86db12ed0eab81d3ed8a78a747dc82b35fc7b6b1 [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"
qinmind4599b42015-09-08 20:06:2013#include "url/gurl.h"
[email protected]efad6642012-02-28 03:42:4214
torne86560112016-08-04 15:59:0415using base::android::ScopedJavaLocalRef;
16
[email protected]efad6642012-02-28 03:42:4217namespace platform_util {
18
19// TODO: crbug/115682 to track implementation of the following methods.
20
[email protected]4d225de12013-12-13 09:29:1721void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
[email protected]efad6642012-02-28 03:42:4222 NOTIMPLEMENTED();
23}
24
asanka655d1112015-03-07 05:33:4125void OpenItem(Profile* profile,
26 const base::FilePath& full_path,
27 OpenItemType item_type,
28 const OpenOperationCallback& callback) {
[email protected]efad6642012-02-28 03:42:4229 NOTIMPLEMENTED();
30}
31
[email protected]7f0a3efa2013-12-12 17:16:1232void OpenExternal(Profile* profile, const GURL& url) {
qinmind4599b42015-09-08 20:06:2033 JNIEnv* env = base::android::AttachCurrentThread();
34 ScopedJavaLocalRef<jstring> j_url =
35 base::android::ConvertUTF8ToJavaString(env, url.spec());
torne948f3662016-08-16 15:10:4436 Java_PlatformUtil_launchExternalProtocol(env, j_url);
[email protected]efad6642012-02-28 03:42:4237}
38
39gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
40 NOTIMPLEMENTED();
[email protected]2d02a2002012-09-18 21:47:5641 return view->GetWindowAndroid();
[email protected]efad6642012-02-28 03:42:4242}
43
44gfx::NativeView GetParent(gfx::NativeView view) {
45 NOTIMPLEMENTED();
46 return view;
47}
48
49bool IsWindowActive(gfx::NativeWindow window) {
50 NOTIMPLEMENTED();
51 return false;
52}
53
54void ActivateWindow(gfx::NativeWindow window) {
55 NOTIMPLEMENTED();
56}
57
58bool IsVisible(gfx::NativeView view) {
59 NOTIMPLEMENTED();
60 return true;
61}
62
63} // namespace platform_util