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

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: Moving offline_page_bridge.cc/h to c/b/a/offline_pages 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
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 "jni/OfflinePageBridge_jni.h"
11
12 namespace offline_pages {
13 namespace android {
14
15 OfflinePageBridge::OfflinePageBridge(JNIEnv* env, jobject obj, Profile* profile)
16 : weak_java_ref_(env, obj),
17 offline_page_model_(nullptr),
18 profile_(profile) {
19 // TODO(fgorski): Pull offline pages model from the factory once it is
20 // available.
21 }
22
23 void OfflinePageBridge::Destroy(JNIEnv*, jobject) {
24 delete this;
25 }
26
27 static jlong Init(JNIEnv* env, jobject obj, jobject j_profile) {
28 return reinterpret_cast<jlong>(new OfflinePageBridge(
29 env, obj, ProfileAndroid::FromProfileAndroid(j_profile)));
30 }
31
32 bool RegisterOfflinePageBridge(JNIEnv* env) {
33 return RegisterNativesImpl(env);
34 }
35
36 } // namespace android
37 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698