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.
5 #include "components/devtools_bridge/android/apiary_client_factory.h"
7 #include "base/android/jni_string.h"
8 #include "google_apis/google_api_keys.h"
9 #include "jni/ApiaryClientFactory_jni.h"
11 using base::android::ConvertUTF8ToJavaString
;
13 namespace devtools_bridge
{
17 bool ApiaryClientFactory::RegisterNatives(JNIEnv
* env
) {
18 return RegisterNativesImpl(env
);
22 jstring
GetAPIKey(JNIEnv
* env
, jobject jcaller
) {
23 return ConvertUTF8ToJavaString(env
, google_apis::GetAPIKey()).Release();
27 jstring
GetOAuthClientId(JNIEnv
* env
, jobject jcaller
) {
28 return ConvertUTF8ToJavaString(
29 env
, google_apis::GetOAuth2ClientID(
30 google_apis::OAuth2Client::CLIENT_MAIN
)).Release();
34 jstring
GetOAuthClientSecret(JNIEnv
* env
, jobject jcaller
) {
35 return ConvertUTF8ToJavaString(
36 env
, google_apis::GetOAuth2ClientSecret(
37 google_apis::OAuth2Client::CLIENT_MAIN
)).Release();
40 } // namespace android
41 } // namespace devtools_bridge