| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ | 6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 InstanceIDAndroid(const std::string& app_id, gcm::GCMDriver* gcm_driver); | 43 InstanceIDAndroid(const std::string& app_id, gcm::GCMDriver* gcm_driver); |
| 44 ~InstanceIDAndroid() override; | 44 ~InstanceIDAndroid() override; |
| 45 | 45 |
| 46 // InstanceID implementation: | 46 // InstanceID implementation: |
| 47 void GetID(const GetIDCallback& callback) override; | 47 void GetID(const GetIDCallback& callback) override; |
| 48 void GetCreationTime(const GetCreationTimeCallback& callback) override; | 48 void GetCreationTime(const GetCreationTimeCallback& callback) override; |
| 49 void GetToken(const std::string& audience, | 49 void GetToken(const std::string& audience, |
| 50 const std::string& scope, | 50 const std::string& scope, |
| 51 const std::map<std::string, std::string>& options, | 51 const std::map<std::string, std::string>& options, |
| 52 const GetTokenCallback& callback) override; | 52 const GetTokenCallback& callback) override; |
| 53 void ValidateToken(const std::string& authorized_entity, |
| 54 const std::string& scope, |
| 55 const std::string& token, |
| 56 const ValidateTokenCallback& callback) override; |
| 53 void DeleteTokenImpl(const std::string& audience, | 57 void DeleteTokenImpl(const std::string& audience, |
| 54 const std::string& scope, | 58 const std::string& scope, |
| 55 const DeleteTokenCallback& callback) override; | 59 const DeleteTokenCallback& callback) override; |
| 56 void DeleteIDImpl(const DeleteIDCallback& callback) override; | 60 void DeleteIDImpl(const DeleteIDCallback& callback) override; |
| 57 | 61 |
| 58 // Methods called from Java via JNI: | 62 // Methods called from Java via JNI: |
| 59 void DidGetID(JNIEnv* env, | 63 void DidGetID(JNIEnv* env, |
| 60 const base::android::JavaParamRef<jobject>& obj, | 64 const base::android::JavaParamRef<jobject>& obj, |
| 61 jint request_id, | 65 jint request_id, |
| 62 const base::android::JavaParamRef<jstring>& jid); | 66 const base::android::JavaParamRef<jstring>& jid); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 87 IDMap<std::unique_ptr<DeleteIDCallback>> delete_id_callbacks_; | 91 IDMap<std::unique_ptr<DeleteIDCallback>> delete_id_callbacks_; |
| 88 | 92 |
| 89 base::ThreadChecker thread_checker_; | 93 base::ThreadChecker thread_checker_; |
| 90 | 94 |
| 91 DISALLOW_COPY_AND_ASSIGN(InstanceIDAndroid); | 95 DISALLOW_COPY_AND_ASSIGN(InstanceIDAndroid); |
| 92 }; | 96 }; |
| 93 | 97 |
| 94 } // namespace instance_id | 98 } // namespace instance_id |
| 95 | 99 |
| 96 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ | 100 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ |
| OLD | NEW |