Roll libvpx 861f35:1fff3e
[chromium-blink-merge.git] / components / devtools_bridge / android / apiary_client_factory.cc
blob2224643faf0df5601e76eb310bba912c6ecbfa66
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 {
14 namespace android {
16 // static
17 bool ApiaryClientFactory::RegisterNatives(JNIEnv* env) {
18 return RegisterNativesImpl(env);
21 // static
22 jstring GetAPIKey(JNIEnv* env, jobject jcaller) {
23 return ConvertUTF8ToJavaString(env, google_apis::GetAPIKey()).Release();
26 // static
27 jstring GetOAuthClientId(JNIEnv* env, jobject jcaller) {
28 return ConvertUTF8ToJavaString(
29 env, google_apis::GetOAuth2ClientID(
30 google_apis::OAuth2Client::CLIENT_MAIN)).Release();
33 // static
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