1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h"
15 namespace offline_pages
{
17 class OfflinePageModel
;
22 * Bridge between C++ and Java for exposing native implementation of offline
23 * pages model in managed code.
25 class OfflinePageBridge
{
27 OfflinePageBridge(JNIEnv
* env
,
29 content::BrowserContext
* browser_context
);
30 void Destroy(JNIEnv
*, jobject
);
34 JavaObjectWeakGlobalRef weak_java_ref_
;
36 OfflinePageModel
* offline_page_model_
;
38 content::BrowserContext
* browser_context_
;
39 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge
);
42 bool RegisterOfflinePageBridge(JNIEnv
* env
);
44 } // namespace android
45 } // namespace offline_pages
47 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_