OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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/google_location_settings_helper_factory.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/jni_string.h" |
| 10 #include "jni/GoogleLocationSettingsHelperStub_jni.h" |
| 11 |
| 12 GoogleLocationSettingsHelperFactory::GoogleLocationSettingsHelperFactory() { |
| 13 } |
| 14 |
| 15 GoogleLocationSettingsHelperFactory::~GoogleLocationSettingsHelperFactory() { |
| 16 } |
| 17 |
| 18 const base::android::ScopedJavaGlobalRef<jobject>& |
| 19 GoogleLocationSettingsHelperFactory::GetHelperInstance() { |
| 20 JNIEnv* env = base::android::AttachCurrentThread(); |
| 21 java_google_location_settings_helper_.Reset( |
| 22 Java_GoogleLocationSettingsHelperStub_createInstance(env, |
| 23 base::android::GetApplicationContext())); |
| 24 return java_google_location_settings_helper_; |
| 25 } |
| 26 |
| 27 // Register native methods |
| 28 |
| 29 bool GoogleLocationSettingsHelperFactory::Register(JNIEnv* env) { |
| 30 return RegisterNativesImpl(env); |
| 31 } |
OLD | NEW |