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

Unified Diff: chrome/browser/android/ntp_snippets_controller.h

Issue 1677073002: Fetch snippets from ChromeReader and show them on the NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning up Created 4 years, 10 months 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
Index: chrome/browser/android/ntp_snippets_controller.h
diff --git a/chrome/browser/android/ntp_snippets_controller.h b/chrome/browser/android/ntp_snippets_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2c3bc82e2c536d0e530a567b18c39a96f32de5c
--- /dev/null
+++ b/chrome/browser/android/ntp_snippets_controller.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef CHROME_BROWSER_ANDROID_NTP_SNIPPETS_CONTROLLER_H_
+#define CHROME_BROWSER_ANDROID_NTP_SNIPPETS_CONTROLLER_H_
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "components/ntp_snippets/ntp_snippets_service.h"
Bernhard Bauer 2016/02/08 18:19:26 I don't think you need this include.
May 2016/02/09 17:38:53 Removed the member NTPSnippetsService variable
+
+namespace ntp_snippets {
+
+class NTPSnippetsService;
+
+// The C++ counterpart to SnippetsController.java. Enables Java code to fetch
+// snippets from the server
+class NTPSnippetsController {
+ public:
+ explicit NTPSnippetsController(jobject j_profile);
+ void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ void FetchSnippets(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ jboolean overwrite);
+
+ private:
+ ~NTPSnippetsController();
+
+ NTPSnippetsService* ntp_snippets_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(NTPSnippetsController);
+};
+
+bool RegisterNTPSnippetsController(JNIEnv* env);
+
+} // namespace ntp_snippets
+
+#endif // CHROME_BROWSER_ANDROID_NTP_SNIPPETS_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698