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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" |
8 | 9 |
9 namespace gcm { | 10 namespace gcm { |
10 static void Java_GCMDriver_doNothing(JNIEnv* env) ALLOW_UNUSED; | 11 static void Java_GCMDriver_doNothing(JNIEnv* env) ALLOW_UNUSED; |
11 } // namespace gcm | 12 } // namespace gcm |
12 | 13 |
13 // Must come after the ALLOW_UNUSED declaration. | 14 // Must come after the ALLOW_UNUSED declaration. |
14 #include "jni/GCMDriver_jni.h" | 15 #include "jni/GCMDriver_jni.h" |
15 | 16 |
16 namespace gcm { | 17 namespace gcm { |
17 | 18 |
| 19 GCMDriverAndroid::GCMDriverAndroid() { |
| 20 } |
| 21 |
| 22 GCMDriverAndroid::~GCMDriverAndroid() { |
| 23 } |
| 24 |
| 25 void GCMDriverAndroid::Enable() { |
| 26 } |
| 27 |
| 28 void GCMDriverAndroid::Disable() { |
| 29 } |
| 30 |
| 31 void GCMDriverAndroid::Register(const std::string& app_id, |
| 32 const std::vector<std::string>& sender_ids, |
| 33 const RegisterCallback& callback) { |
| 34 // TODO(johnme): Hook up to Android GCM API via JNI. |
| 35 NOTIMPLEMENTED(); |
| 36 } |
| 37 |
| 38 void GCMDriverAndroid::Unregister(const std::string& app_id, |
| 39 const UnregisterCallback& callback) { |
| 40 // TODO(johnme): Hook up to Android GCM API via JNI. |
| 41 NOTIMPLEMENTED(); |
| 42 } |
| 43 |
| 44 void GCMDriverAndroid::Send(const std::string& app_id, |
| 45 const std::string& receiver_id, |
| 46 const GCMClient::OutgoingMessage& message, |
| 47 const SendCallback& callback) { |
| 48 NOTIMPLEMENTED(); |
| 49 } |
| 50 |
| 51 GCMClient* GCMDriverAndroid::GetGCMClientForTesting() const { |
| 52 NOTIMPLEMENTED(); |
| 53 return NULL; |
| 54 } |
| 55 |
| 56 bool GCMDriverAndroid::IsStarted() const { |
| 57 return true; |
| 58 } |
| 59 |
| 60 bool GCMDriverAndroid::IsGCMClientReady() const { |
| 61 return true; |
| 62 } |
| 63 |
| 64 void GCMDriverAndroid::GetGCMStatistics( |
| 65 const GetGCMStatisticsCallback& callback, |
| 66 bool clear_logs) { |
| 67 NOTIMPLEMENTED(); |
| 68 } |
| 69 |
| 70 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 71 bool recording) { |
| 72 NOTIMPLEMENTED(); |
| 73 } |
| 74 |
| 75 std::string GCMDriverAndroid::SignedInUserName() const { |
| 76 return std::string(); |
| 77 } |
| 78 |
18 // static | 79 // static |
19 bool GCMDriverAndroid::RegisterBindings(JNIEnv* env) { | 80 bool GCMDriverAndroid::RegisterBindings(JNIEnv* env) { |
20 return RegisterNativesImpl(env); | 81 return RegisterNativesImpl(env); |
21 } | 82 } |
22 | 83 |
23 } // namespace gcm | 84 } // namespace gcm |
OLD | NEW |