Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / android / offline_pages / offline_page_bridge.h
blobea61576ec03a325067547975e812954acb21e84d
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"
11 namespace content {
12 class BrowserContext;
15 namespace offline_pages {
17 class OfflinePageModel;
19 namespace android {
21 /**
22 * Bridge between C++ and Java for exposing native implementation of offline
23 * pages model in managed code.
25 class OfflinePageBridge {
26 public:
27 OfflinePageBridge(JNIEnv* env,
28 jobject obj,
29 content::BrowserContext* browser_context);
30 void Destroy(JNIEnv*, jobject);
32 private:
34 JavaObjectWeakGlobalRef weak_java_ref_;
35 // Not owned.
36 OfflinePageModel* offline_page_model_;
37 // Not owned.
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_