OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 | |
5 #include "chrome/browser/android/ntp/notification_helper.h" | |
6 | |
7 #include "base/android/jni_android.h" | |
8 #include "base/android/jni_string.h" | |
9 #include "jni/NotificationHelper_jni.h" | |
10 | |
11 namespace ntp_snippets { | |
12 | |
13 void NotificationHelper::OpenURL(const GURL& url) { | |
14 JNIEnv* env = base::android::AttachCurrentThread(); | |
Bernhard Bauer
2016/12/19 17:04:10
You are also going to have to register the JNI met
sfiera
2016/12/19 17:09:40
Here we only have @CalledFromNative (C++->Java), n
Bernhard Bauer
2016/12/19 17:20:16
I vaguely remember that the guidance was to call R
sfiera
2016/12/19 18:21:24
OK. I was working on the model of path_utils.cc, w
| |
15 Java_NotificationHelper_openUrl( | |
16 env, base::android::ConvertUTF8ToJavaString(env, url.spec())); | |
17 } | |
18 | |
19 } // namespace ntp_snippets | |
OLD | NEW |