Chromium Code Reviews| Index: chrome/browser/android/ntp/notification_helper.cc |
| diff --git a/chrome/browser/android/ntp/notification_helper.cc b/chrome/browser/android/ntp/notification_helper.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b81a93b83ed7ddef40ba09eead1ff097c24341e4 |
| --- /dev/null |
| +++ b/chrome/browser/android/ntp/notification_helper.cc |
| @@ -0,0 +1,19 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/android/ntp/notification_helper.h" |
| + |
| +#include "base/android/jni_android.h" |
| +#include "base/android/jni_string.h" |
| +#include "jni/NotificationHelper_jni.h" |
| + |
| +namespace ntp_snippets { |
| + |
| +void NotificationHelper::OpenURL(const GURL& url) { |
| + 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
|
| + Java_NotificationHelper_openUrl( |
| + env, base::android::ConvertUTF8ToJavaString(env, url.spec())); |
| +} |
| + |
| +} // namespace ntp_snippets |