OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "components/gcm_driver/gcm_driver_android.h" | 5 #include "components/gcm_driver/gcm_driver_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 void GCMDriverAndroid::UpdateAccountMapping( | 147 void GCMDriverAndroid::UpdateAccountMapping( |
148 const AccountMapping& account_mapping) { | 148 const AccountMapping& account_mapping) { |
149 NOTIMPLEMENTED(); | 149 NOTIMPLEMENTED(); |
150 } | 150 } |
151 | 151 |
152 void GCMDriverAndroid::RemoveAccountMapping(const std::string& account_id) { | 152 void GCMDriverAndroid::RemoveAccountMapping(const std::string& account_id) { |
153 NOTIMPLEMENTED(); | 153 NOTIMPLEMENTED(); |
154 } | 154 } |
155 | 155 |
| 156 base::Time GCMDriverAndroid::GetLastTokenFetchingTime() { |
| 157 NOTIMPLEMENTED(); |
| 158 } |
| 159 |
| 160 void GCMDriverAndroid::SetLastTokenFetchingTime(const base::Time& time) { |
| 161 NOTIMPLEMENTED(); |
| 162 } |
| 163 |
156 GCMClient::Result GCMDriverAndroid::EnsureStarted() { | 164 GCMClient::Result GCMDriverAndroid::EnsureStarted() { |
157 // TODO(johnme): Maybe we should check if GMS is available? | 165 // TODO(johnme): Maybe we should check if GMS is available? |
158 return GCMClient::SUCCESS; | 166 return GCMClient::SUCCESS; |
159 } | 167 } |
160 | 168 |
161 void GCMDriverAndroid::RegisterImpl( | 169 void GCMDriverAndroid::RegisterImpl( |
162 const std::string& app_id, | 170 const std::string& app_id, |
163 const std::vector<std::string>& sender_ids) { | 171 const std::vector<std::string>& sender_ids) { |
164 JNIEnv* env = AttachCurrentThread(); | 172 JNIEnv* env = AttachCurrentThread(); |
165 Java_GCMDriver_register( | 173 Java_GCMDriver_register( |
166 env, java_ref_.obj(), | 174 env, java_ref_.obj(), |
167 ConvertUTF8ToJavaString(env, app_id).Release(), | 175 ConvertUTF8ToJavaString(env, app_id).Release(), |
168 ToJavaArrayOfStrings(env, sender_ids).obj()); | 176 ToJavaArrayOfStrings(env, sender_ids).obj()); |
169 } | 177 } |
170 | 178 |
171 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { | 179 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { |
172 JNIEnv* env = AttachCurrentThread(); | 180 JNIEnv* env = AttachCurrentThread(); |
173 Java_GCMDriver_unregister( | 181 Java_GCMDriver_unregister( |
174 env, java_ref_.obj(), | 182 env, java_ref_.obj(), |
175 ConvertUTF8ToJavaString(env, app_id).Release()); | 183 ConvertUTF8ToJavaString(env, app_id).Release()); |
176 } | 184 } |
177 | 185 |
178 void GCMDriverAndroid::SendImpl(const std::string& app_id, | 186 void GCMDriverAndroid::SendImpl(const std::string& app_id, |
179 const std::string& receiver_id, | 187 const std::string& receiver_id, |
180 const GCMClient::OutgoingMessage& message) { | 188 const GCMClient::OutgoingMessage& message) { |
181 NOTIMPLEMENTED(); | 189 NOTIMPLEMENTED(); |
182 } | 190 } |
183 | 191 |
184 } // namespace gcm | 192 } // namespace gcm |
OLD | NEW |