Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: components/gcm_driver/gcm_driver_android.h

Issue 1231613005: Hook up the Push API with GCM's new ability to own encryption keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-encryption
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h"
13 #include "components/gcm_driver/gcm_driver.h" 14 #include "components/gcm_driver/gcm_driver.h"
14 15
16 namespace base {
17 class FilePath;
18 class SequencedTaskRunner;
19 }
20
15 namespace gcm { 21 namespace gcm {
16 22
17 // GCMDriver implementation for Android, using Android GCM APIs. 23 // GCMDriver implementation for Android, using Android GCM APIs.
18 class GCMDriverAndroid : public GCMDriver { 24 class GCMDriverAndroid : public GCMDriver {
19 public: 25 public:
20 GCMDriverAndroid(); 26 GCMDriverAndroid(
27 const base::FilePath& store_path,
28 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner);
21 ~GCMDriverAndroid() override; 29 ~GCMDriverAndroid() override;
22 30
23 // Methods called from Java via JNI: 31 // Methods called from Java via JNI:
24 void OnRegisterFinished(JNIEnv* env, 32 void OnRegisterFinished(JNIEnv* env,
25 jobject obj, 33 jobject obj,
26 jstring app_id, 34 jstring app_id,
27 jstring registration_id, 35 jstring registration_id,
28 jboolean success); 36 jboolean success);
29 void OnUnregisterFinished(JNIEnv* env, 37 void OnUnregisterFinished(JNIEnv* env,
30 jobject obj, 38 jobject obj,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 90
83 private: 91 private:
84 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 92 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
85 93
86 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); 94 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid);
87 }; 95 };
88 96
89 } // namespace gcm 97 } // namespace gcm
90 98
91 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 99 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698