[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 1 | // 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 | |||||
qinmin | d4599b4 | 2015-09-08 20:06:20 | [diff] [blame] | 5 | #include <jni.h> |
6 | |||||
7 | #include "base/android/jni_android.h" | ||||
8 | #include "base/android/jni_string.h" | ||||
Hans Wennborg | 1790e6b | 2020-04-24 19:10:33 | [diff] [blame] | 9 | #include "base/notreached.h" |
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 10 | #include "chrome/browser/platform_util.h" |
Henrique Nakashima | 1d8cf4e | 2019-10-24 22:31:38 | [diff] [blame] | 11 | #include "chrome/browser/util/jni_headers/PlatformUtil_jni.h" |
jaekyun | e4f9eed | 2015-02-24 02:06:58 | [diff] [blame] | 12 | #include "ui/android/view_android.h" |
Christoph Schwering | a1ea47fae | 2022-03-10 02:09:53 | [diff] [blame^] | 13 | #include "ui/android/window_android.h" |
qinmin | d4599b4 | 2015-09-08 20:06:20 | [diff] [blame] | 14 | #include "url/gurl.h" |
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 15 | |
torne | 8656011 | 2016-08-04 15:59:04 | [diff] [blame] | 16 | using base::android::ScopedJavaLocalRef; |
17 | |||||
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 18 | namespace platform_util { |
19 | |||||
20 | // TODO: crbug/115682 to track implementation of the following methods. | ||||
21 | |||||
[email protected] | 4d225de1 | 2013-12-13 09:29:17 | [diff] [blame] | 22 | void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) { |
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 23 | NOTIMPLEMENTED(); |
24 | } | ||||
25 | |||||
asanka | 655d111 | 2015-03-07 05:33:41 | [diff] [blame] | 26 | void OpenItem(Profile* profile, |
27 | const base::FilePath& full_path, | ||||
28 | OpenItemType item_type, | ||||
Alexander Cooper | 71fa2b0 | 2020-07-16 17:49:36 | [diff] [blame] | 29 | OpenOperationCallback callback) { |
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 30 | NOTIMPLEMENTED(); |
31 | } | ||||
32 | |||||
[email protected] | 7f0a3efa | 2013-12-12 17:16:12 | [diff] [blame] | 33 | void OpenExternal(Profile* profile, const GURL& url) { |
qinmin | d4599b4 | 2015-09-08 20:06:20 | [diff] [blame] | 34 | JNIEnv* env = base::android::AttachCurrentThread(); |
35 | ScopedJavaLocalRef<jstring> j_url = | ||||
36 | base::android::ConvertUTF8ToJavaString(env, url.spec()); | ||||
torne | 948f366 | 2016-08-16 15:10:44 | [diff] [blame] | 37 | Java_PlatformUtil_launchExternalProtocol(env, j_url); |
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 38 | } |
39 | |||||
40 | gfx::NativeWindow GetTopLevel(gfx::NativeView view) { | ||||
41 | NOTIMPLEMENTED(); | ||||
[email protected] | 2d02a200 | 2012-09-18 21:47:56 | [diff] [blame] | 42 | return view->GetWindowAndroid(); |
[email protected] | efad664 | 2012-02-28 03:42:42 | [diff] [blame] | 43 | } |
44 | |||||
45 | gfx::NativeView GetParent(gfx::NativeView view) { | ||||
46 | NOTIMPLEMENTED(); | ||||
47 | return view; | ||||
48 | } | ||||
49 | |||||
50 | bool IsWindowActive(gfx::NativeWindow window) { | ||||
51 | NOTIMPLEMENTED(); | ||||
52 | return false; | ||||
53 | } | ||||
54 | |||||
55 | void ActivateWindow(gfx::NativeWindow window) { | ||||
56 | NOTIMPLEMENTED(); | ||||
57 | } | ||||
58 | |||||
59 | bool IsVisible(gfx::NativeView view) { | ||||
60 | NOTIMPLEMENTED(); | ||||
61 | return true; | ||||
62 | } | ||||
63 | |||||
64 | } // namespace platform_util |