[M120 Migration]Fix for crash during chrome exit
[platform/framework/web/chromium-efl.git] / chrome / browser / platform_util_android.cc
1 // Copyright 2012 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <jni.h>
6
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "base/notreached.h"
10 #include "chrome/browser/platform_util.h"
11 #include "chrome/browser/util/jni_headers/PlatformUtil_jni.h"
12 #include "ui/android/view_android.h"
13 #include "ui/android/window_android.h"
14 #include "url/gurl.h"
15
16 using base::android::ScopedJavaLocalRef;
17
18 namespace platform_util {
19
20 // TODO: crbug/115682 to track implementation of the following methods.
21
22 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
23   NOTIMPLEMENTED();
24 }
25
26 void OpenItem(Profile* profile,
27               const base::FilePath& full_path,
28               OpenItemType item_type,
29               OpenOperationCallback callback) {
30   NOTIMPLEMENTED();
31 }
32
33 void OpenExternal(const GURL& url) {
34   JNIEnv* env = base::android::AttachCurrentThread();
35   ScopedJavaLocalRef<jstring> j_url =
36       base::android::ConvertUTF8ToJavaString(env, url.spec());
37   Java_PlatformUtil_launchExternalProtocol(env, j_url);
38 }
39
40 gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
41   NOTIMPLEMENTED();
42   return view->GetWindowAndroid();
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