OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TAB_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_helper.h" | 10 #include "base/android/jni_helper.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 class WebContents; | 37 class WebContents; |
38 } | 38 } |
39 | 39 |
40 class TabAndroid : public CoreTabHelperDelegate, | 40 class TabAndroid : public CoreTabHelperDelegate, |
41 public content::NotificationObserver { | 41 public content::NotificationObserver { |
42 public: | 42 public: |
43 // Convenience method to retrieve the Tab associated with the passed | 43 // Convenience method to retrieve the Tab associated with the passed |
44 // WebContents. Can return NULL. | 44 // WebContents. Can return NULL. |
45 static TabAndroid* FromWebContents(content::WebContents* web_contents); | 45 static TabAndroid* FromWebContents(content::WebContents* web_contents); |
46 | 46 |
47 // Returns the native TabAndroid stored in the Java TabBase represented by | 47 // Returns the native TabAndroid stored in the Java Tab represented by |
48 // |obj|. | 48 // |obj|. |
49 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); | 49 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); |
50 | 50 |
51 TabAndroid(JNIEnv* env, jobject obj); | 51 TabAndroid(JNIEnv* env, jobject obj); |
52 virtual ~TabAndroid(); | 52 virtual ~TabAndroid(); |
53 | 53 |
54 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 54 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
55 | 55 |
56 // Return the WebContents, if any, currently owned by this TabAndroid. | 56 // Return the WebContents, if any, currently owned by this TabAndroid. |
57 content::WebContents* web_contents() const { return web_contents_.get(); } | 57 content::WebContents* web_contents() const { return web_contents_.get(); } |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 scoped_ptr<content::WebContents> web_contents_; | 154 scoped_ptr<content::WebContents> web_contents_; |
155 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | 155 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> |
156 web_contents_delegate_; | 156 web_contents_delegate_; |
157 | 157 |
158 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 158 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
159 | 159 |
160 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 160 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
161 }; | 161 }; |
162 | 162 |
163 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 163 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
OLD | NEW |