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_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 jint page_transition, | 136 jint page_transition, |
137 jstring j_referrer_url, | 137 jstring j_referrer_url, |
138 jint referrer_policy, | 138 jint referrer_policy, |
139 jboolean is_renderer_initiated); | 139 jboolean is_renderer_initiated); |
140 ToolbarModel::SecurityLevel GetSecurityLevel(JNIEnv* env, jobject obj); | 140 ToolbarModel::SecurityLevel GetSecurityLevel(JNIEnv* env, jobject obj); |
141 void SetActiveNavigationEntryTitleForUrl(JNIEnv* env, | 141 void SetActiveNavigationEntryTitleForUrl(JNIEnv* env, |
142 jobject obj, | 142 jobject obj, |
143 jstring jurl, | 143 jstring jurl, |
144 jstring jtitle); | 144 jstring jtitle); |
145 bool Print(JNIEnv* env, jobject obj); | 145 bool Print(JNIEnv* env, jobject obj); |
| 146 // Called to get favicon of current tab, return null if no favicon is |
| 147 // avaliable for current tab. |
| 148 base::android::ScopedJavaLocalRef<jobject> GetFavicon(JNIEnv* env, |
| 149 jobject obj); |
146 | 150 |
147 // Register the Tab's native methods through JNI. | 151 // Register the Tab's native methods through JNI. |
148 static bool RegisterTabAndroid(JNIEnv* env); | 152 static bool RegisterTabAndroid(JNIEnv* env); |
149 | 153 |
150 private: | 154 private: |
151 prerender::PrerenderManager* GetPrerenderManager() const; | 155 prerender::PrerenderManager* GetPrerenderManager() const; |
152 | 156 |
153 JavaObjectWeakGlobalRef weak_java_tab_; | 157 JavaObjectWeakGlobalRef weak_java_tab_; |
154 | 158 |
155 // The identifier used by session restore for this tab. | 159 // The identifier used by session restore for this tab. |
156 SessionID session_tab_id_; | 160 SessionID session_tab_id_; |
157 | 161 |
158 // Identifier of the window the tab is in. | 162 // Identifier of the window the tab is in. |
159 SessionID session_window_id_; | 163 SessionID session_window_id_; |
160 | 164 |
161 content::NotificationRegistrar notification_registrar_; | 165 content::NotificationRegistrar notification_registrar_; |
162 | 166 |
163 scoped_ptr<content::WebContents> web_contents_; | 167 scoped_ptr<content::WebContents> web_contents_; |
164 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | 168 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> |
165 web_contents_delegate_; | 169 web_contents_delegate_; |
166 | 170 |
167 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 171 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
168 | 172 |
169 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 173 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
170 }; | 174 }; |
171 | 175 |
172 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 176 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
OLD | NEW |