| 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 18 matching lines...) Expand all Loading... |
| 29 void SetOnForeignSessionCallback(JNIEnv* env, jobject obj, jobject callback); | 29 void SetOnForeignSessionCallback(JNIEnv* env, jobject obj, jobject callback); |
| 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 jstring session_tag, | 33 jstring session_tag, |
| 34 jint tab_id); | 34 jint tab_id); |
| 35 void SetForeignSessionCollapsed(JNIEnv* env, | 35 void SetForeignSessionCollapsed(JNIEnv* env, |
| 36 jobject obj, | 36 jobject obj, |
| 37 jstring session_tag, | 37 jstring session_tag, |
| 38 jboolean is_collapsed); | 38 jboolean is_collapsed); |
| 39 jboolean GetForeignSessionCollapsed(JNIEnv* env, |
| 40 jobject obj, |
| 41 jstring session_tag); |
| 39 void DeleteForeignSession(JNIEnv* env, jobject obj, jstring session_tag); | 42 void DeleteForeignSession(JNIEnv* env, jobject obj, jstring session_tag); |
| 40 | 43 |
| 41 // NotificationObserver implemenation | 44 // NotificationObserver implemenation |
| 42 virtual void Observe(int type, | 45 virtual void Observe(int type, |
| 43 const content::NotificationSource& source, | 46 const content::NotificationSource& source, |
| 44 const content::NotificationDetails& details) OVERRIDE; | 47 const content::NotificationDetails& details) OVERRIDE; |
| 45 | 48 |
| 46 static bool RegisterForeignSessionHelper(JNIEnv* env); | 49 static bool RegisterForeignSessionHelper(JNIEnv* env); |
| 47 | 50 |
| 48 private: | 51 private: |
| 49 virtual ~ForeignSessionHelper(); | 52 virtual ~ForeignSessionHelper(); |
| 50 | 53 |
| 51 Profile* profile_; // weak | 54 Profile* profile_; // weak |
| 52 base::android::ScopedJavaGlobalRef<jobject> callback_; | 55 base::android::ScopedJavaGlobalRef<jobject> callback_; |
| 53 content::NotificationRegistrar registrar_; | 56 content::NotificationRegistrar registrar_; |
| 54 | 57 |
| 55 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper); | 58 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper); |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | 61 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ |
| OLD | NEW |