OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | |
6 #define CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | |
7 | |
8 #include <jni.h> | |
9 | |
10 #include "base/android/scoped_java_ref.h" | |
11 #include "base/basictypes.h" | |
12 #include "chrome/browser/profiles/profile.h" | |
13 #include "chrome/browser/ui/webui/session_favicon_source.h" | |
14 #include "content/public/browser/notification_observer.h" | |
15 #include "content/public/browser/notification_registrar.h" | |
16 | |
17 using base::android::ScopedJavaLocalRef; | |
18 | |
19 class SessionWindow; | |
20 | |
21 namespace browser_sync { | |
22 class SessionModelAssociator; | |
23 class SyncedSession; | |
24 } // namespace browser_sync | |
25 | |
26 class ForeignSessionHelper : public content::NotificationObserver { | |
27 public: | |
28 explicit ForeignSessionHelper(Profile* profile); | |
29 void Destroy(JNIEnv* env, jobject obj); | |
30 jboolean IsTabSyncEnabled(JNIEnv* env, jobject obj); | |
31 void SetOnForeignSessionCallback(JNIEnv* env, jobject obj, jobject callback); | |
32 jboolean GetForeignSessions(JNIEnv* env, jobject obj, jobject result); | |
33 jboolean OpenForeignSessionTab(JNIEnv* env, | |
34 jobject obj, | |
35 jstring session_tag, | |
36 jint tab_id); | |
37 void SetForeignSessionCollapsed(JNIEnv* env, | |
38 jobject obj, | |
39 jstring session_tag, | |
40 jboolean is_collapsed); | |
41 void DeleteForeignSession(JNIEnv* env, jobject obj, jstring session_tag); | |
42 | |
43 // NotificationObserver implemenation | |
44 virtual void Observe(int type, | |
45 const content::NotificationSource& source, | |
46 const content::NotificationDetails& details) OVERRIDE; | |
47 | |
48 static bool RegisterForeignSessionHelper(JNIEnv* env); | |
49 | |
50 private: | |
51 virtual ~ForeignSessionHelper() OVERRIDE; | |
Ted C
2013/07/26 23:48:32
I don't think you need OVERRIDE here.
Kibeom Kim (inactive)
2013/07/27 00:03:26
Done.
| |
52 | |
53 Profile* profile_; // weak | |
54 base::android::ScopedJavaGlobalRef<jobject> callback_; | |
55 content::NotificationRegistrar registrar_; | |
56 | |
57 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper); | |
58 }; | |
59 | |
60 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ | |
OLD | NEW |