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

Side by Side Diff: chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: namespaces to classes, native init, enum Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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 "base/android/jni_android.h"
6 #include "base/android/jni_string.h"
7
nyquist 2014/07/08 01:02:32 remove empty line
sunangel 2014/07/08 20:40:56 Done.
8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory_android.h"
nyquist 2014/07/08 01:02:32 this include should go at the top, and then an emp
sunangel 2014/07/08 20:40:56 Done.
10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_android.h"
12
nyquist 2014/07/08 01:02:32 remove empty line
sunangel 2014/07/08 20:40:57 Done.
13 #include "components/dom_distiller/core/dom_distiller_service_android.h"
14
nyquist 2014/07/08 01:02:32 remove empty line
sunangel 2014/07/08 20:40:57 Done.
15 #include "jni/DomDistillerServiceFactory_jni.h"
16
17 using base::android::ScopedJavaLocalRef;
18
19 namespace dom_distiller{
20 namespace android {
21
22 jobject DomDistillerServiceFactoryAndroid::GetForProfile(
23 JNIEnv* env, jclass clazz, jobject j_profile) {
24 dom_distiller::DomDistillerService* service =
25 dom_distiller::DomDistillerServiceFactory::GetForBrowserContext(
26 ProfileAndroid::FromProfileAndroid(j_profile));
27 DomDistillerServiceAndroid* d = new DomDistillerServiceAndroid(service);
nyquist 2014/07/08 01:02:32 service_android
sunangel 2014/07/08 20:40:57 Done.
28 return d->java_ref_.obj();
29 }
30
31 bool DomDistillerServiceFactoryAndroid::Register(JNIEnv* env) {
32 return RegisterNativesImpl(env);
33 }
34
35 jobject GetForProfile(JNIEnv* env, jclass clazz, jobject j_profile){
36 return DomDistillerServiceFactoryAndroid::GetForProfile(
37 env, clazz, j_profile);
38 }
39
40 } // namespace android
41 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698