OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ |
6 #define CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | 6 #define CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_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" |
(...skipping 19 matching lines...) Expand all Loading... |
30 jboolean GetForeignSessions(JNIEnv* env, jobject obj, jobject result); | 30 jboolean GetForeignSessions(JNIEnv* env, jobject obj, jobject result); |
31 jboolean OpenForeignSessionTab(JNIEnv* env, | 31 jboolean OpenForeignSessionTab(JNIEnv* env, |
32 jobject obj, | 32 jobject obj, |
33 jobject j_tab, | 33 jobject j_tab, |
34 jstring session_tag, | 34 jstring session_tag, |
35 jint tab_id, | 35 jint tab_id, |
36 jint disposition); | 36 jint disposition); |
37 void DeleteForeignSession(JNIEnv* env, jobject obj, jstring session_tag); | 37 void DeleteForeignSession(JNIEnv* env, jobject obj, jstring session_tag); |
38 | 38 |
39 // NotificationObserver implemenation | 39 // NotificationObserver implemenation |
40 virtual void Observe(int type, | 40 void Observe(int type, |
41 const content::NotificationSource& source, | 41 const content::NotificationSource& source, |
42 const content::NotificationDetails& details) override; | 42 const content::NotificationDetails& details) override; |
43 | 43 |
44 static bool RegisterForeignSessionHelper(JNIEnv* env); | 44 static bool RegisterForeignSessionHelper(JNIEnv* env); |
45 | 45 |
46 private: | 46 private: |
47 virtual ~ForeignSessionHelper(); | 47 ~ForeignSessionHelper() override; |
48 | 48 |
49 Profile* profile_; // weak | 49 Profile* profile_; // weak |
50 base::android::ScopedJavaGlobalRef<jobject> callback_; | 50 base::android::ScopedJavaGlobalRef<jobject> callback_; |
51 content::NotificationRegistrar registrar_; | 51 content::NotificationRegistrar registrar_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper); | 53 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper); |
54 }; | 54 }; |
55 | 55 |
56 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | 56 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ |
OLD | NEW |