Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4132)

Unified Diff: chrome/browser/android/ntp/content_suggestions_notification_helper.cc

Issue 2586293002: Add helper to open URL in new activity (Closed)
Patch Set: Address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/ntp/content_suggestions_notification_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/content_suggestions_notification_helper.cc
diff --git a/chrome/browser/android/ntp/content_suggestions_notification_helper.cc b/chrome/browser/android/ntp/content_suggestions_notification_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6e05fdbef276a3ccc36df27455249ee59fce40bd
--- /dev/null
+++ b/chrome/browser/android/ntp/content_suggestions_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/content_suggestions_notification_helper.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_string.h"
+#include "jni/ContentSuggestionsNotificationHelper_jni.h"
+
+namespace ntp_snippets {
+
+void ContentSuggestionsNotificationHelper::OpenURL(const GURL& url) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_ContentSuggestionsNotificationHelper_openUrl(
+ env, base::android::ConvertUTF8ToJavaString(env, url.spec()));
+}
+
+} // namespace ntp_snippets
« no previous file with comments | « chrome/browser/android/ntp/content_suggestions_notification_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698