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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_bridge.cc

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 unified diff | Download patch
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/android/offline_pages/offline_page_bridge.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/profile_android.h"
9 #include "components/offline_pages/offline_page_model.h"
10 #include "content/public/browser/browser_context.h"
11 #include "jni/OfflinePageBridge_jni.h"
12
13 namespace offline_pages {
14 namespace android {
15
16 OfflinePageBridge::OfflinePageBridge(JNIEnv* env,
17 jobject obj,
18 content::BrowserContext* browser_context)
19 : weak_java_ref_(env, obj),
20 offline_page_model_(nullptr),
21 browser_context_(browser_context) {
22 // TODO(fgorski): Pull offline pages model from the factory once it is
23 // available.
24 }
25
26 void OfflinePageBridge::Destroy(JNIEnv*, jobject) {
27 delete this;
28 }
29
30 static jlong Init(JNIEnv* env, jobject obj, jobject j_profile) {
31 return reinterpret_cast<jlong>(new OfflinePageBridge(
32 env, obj, ProfileAndroid::FromProfileAndroid(j_profile)));
33 }
34
35 bool RegisterOfflinePageBridge(JNIEnv* env) {
36 return RegisterNativesImpl(env);
37 }
38
39 } // namespace android
40 } // namespace offline_pages
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698