Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| 8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | |
| 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory_android.h" | |
| 10 #include "chrome/browser/profiles/profile.h" | |
| 11 #include "chrome/browser/profiles/profile_android.h" | |
| 12 | |
| 13 #include "jni/DomDistillerServiceFactory_jni.h" | |
| 14 | |
| 15 static jlong GetDomDistillerServiceForProfile(JNIEnv* env, | |
|
nyquist
2014/06/30 20:33:22
Could this instead return the jobject for DomDisti
sunangel
2014/07/07 21:21:29
Done.
| |
| 16 jclass clazz, | |
| 17 jobject j_profile) { | |
| 18 Profile* nativeProfilePointer = ProfileAndroid::FromProfileAndroid(j_profile); | |
|
nyquist
2014/06/30 20:33:22
Just |profile|
sunangel
2014/07/07 21:21:29
Done.
| |
| 19 dom_distiller::DomDistillerService* service = | |
| 20 dom_distiller::DomDistillerServiceFactory::GetForBrowserContext( | |
| 21 nativeProfilePointer); | |
| 22 return reinterpret_cast<intptr_t>(service); | |
|
nyquist
2014/06/30 20:33:23
I think here you can new the DomDistillerServiceAn
sunangel
2014/07/07 21:21:29
Done.
| |
| 23 } | |
| 24 | |
| 25 bool RegisterDomDistillerServiceFactory(JNIEnv* env) { | |
| 26 return RegisterNativesImpl(env); | |
| 27 } | |
| OLD | NEW |