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

Unified Diff: chrome/browser/android/offline_pages/background_scheduler_bridge.h

Issue 1928813002: Adds initial JNI bridge code for Background Scheduler implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: C++ style guide change Created 4 years, 8 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/offline_pages/background_scheduler_bridge.h
diff --git a/chrome/browser/android/offline_pages/background_scheduler_bridge.h b/chrome/browser/android/offline_pages/background_scheduler_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..71aad2ff66876b02b93712fe1ab4d52830994065
--- /dev/null
+++ b/chrome/browser/android/offline_pages/background_scheduler_bridge.h
@@ -0,0 +1,37 @@
+// 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_OFFLINE_PAGES_BACKGROUND_SCHEDULER_BRIDGE_H_
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_SCHEDULER_BRIDGE_H_
+
+#include "components/offline_pages/background/scheduler.h"
+
+#include "base/android/jni_android.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace offline_pages {
+namespace android {
+
+// Bridge between C++ and Java for implementing background scheduler
+// on Android.
+class BackgroundSchedulerBridge : Scheduler {
+ public:
+ BackgroundSchedulerBridge();
+ ~BackgroundSchedulerBridge() override;
+
+ // Scheduler implementation.
+ void Schedule(const TriggerCondition& trigger_condition) override;
+ void Unschedule() override;
+};
+
+bool RegisterBackgroundSchedulerBridge(JNIEnv* env);
+
+} // namespace android
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_SCHEDULER_BRIDGE_H_
+
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/offline_pages/background_scheduler_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698