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

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

Issue 1232843003: [Offline Pages] Stub of offline pages bridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing feedback Created 5 years, 5 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/offline_page_bridge.h
diff --git a/chrome/browser/android/offline_pages/offline_page_bridge.h b/chrome/browser/android/offline_pages/offline_page_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea61576ec03a325067547975e812954acb21e84d
--- /dev/null
+++ b/chrome/browser/android/offline_pages/offline_page_bridge.h
@@ -0,0 +1,48 @@
+// Copyright 2015 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_OFFLINE_PAGE_BRIDGE_H_
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_weak_ref.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace offline_pages {
+
+class OfflinePageModel;
+
+namespace android {
+
+/**
+ * Bridge between C++ and Java for exposing native implementation of offline
+ * pages model in managed code.
+ */
+class OfflinePageBridge {
+ public:
+ OfflinePageBridge(JNIEnv* env,
+ jobject obj,
+ content::BrowserContext* browser_context);
+ void Destroy(JNIEnv*, jobject);
+
+ private:
+
+ JavaObjectWeakGlobalRef weak_java_ref_;
+ // Not owned.
+ OfflinePageModel* offline_page_model_;
+ // Not owned.
+ content::BrowserContext* browser_context_;
+ DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge);
+};
+
+bool RegisterOfflinePageBridge(JNIEnv* env);
+
+} // namespace android
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
+
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/offline_pages/offline_page_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698