| 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 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 void SetWindowSessionID(SessionID::id_type window_id); | 116 void SetWindowSessionID(SessionID::id_type window_id); |
| 117 void SetSyncId(int sync_id); | 117 void SetSyncId(int sync_id); |
| 118 | 118 |
| 119 void HandlePopupNavigation(chrome::NavigateParams* params); | 119 void HandlePopupNavigation(chrome::NavigateParams* params); |
| 120 | 120 |
| 121 bool HasPrerenderedUrl(GURL gurl); | 121 bool HasPrerenderedUrl(GURL gurl); |
| 122 | 122 |
| 123 bool HasOfflinePages() const; | 123 bool HasOfflinePages() const; |
| 124 void ShowOfflinePages(); | 124 void ShowOfflinePages(); |
| 125 void LoadOfflineCopy(const GURL& url); | |
| 126 | 125 |
| 127 // Notifies this TabAndroid that a Lo-Fi response has been received. The | 126 // Notifies this TabAndroid that a Lo-Fi response has been received. The |
| 128 // TabAndroid then handles showing Lo-Fi UI if this is the first Lo-Fi | 127 // TabAndroid then handles showing Lo-Fi UI if this is the first Lo-Fi |
| 129 // response for a page load. |is_preview| indicates whether the response was a | 128 // response for a page load. |is_preview| indicates whether the response was a |
| 130 // Lo-Fi preview response. | 129 // Lo-Fi preview response. |
| 131 void OnLoFiResponseReceived(bool is_preview); | 130 void OnLoFiResponseReceived(bool is_preview); |
| 132 | 131 |
| 133 // Overridden from CoreTabHelperDelegate: | 132 // Overridden from CoreTabHelperDelegate: |
| 134 void SwapTabContents(content::WebContents* old_contents, | 133 void SwapTabContents(content::WebContents* old_contents, |
| 135 content::WebContents* new_contents, | 134 content::WebContents* new_contents, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 bool HasPrerenderedUrl(JNIEnv* env, | 259 bool HasPrerenderedUrl(JNIEnv* env, |
| 261 const base::android::JavaParamRef<jobject>& obj, | 260 const base::android::JavaParamRef<jobject>& obj, |
| 262 const base::android::JavaParamRef<jstring>& url); | 261 const base::android::JavaParamRef<jstring>& url); |
| 263 | 262 |
| 264 // Register the Tab's native methods through JNI. | 263 // Register the Tab's native methods through JNI. |
| 265 static bool RegisterTabAndroid(JNIEnv* env); | 264 static bool RegisterTabAndroid(JNIEnv* env); |
| 266 | 265 |
| 267 private: | 266 private: |
| 268 prerender::PrerenderManager* GetPrerenderManager() const; | 267 prerender::PrerenderManager* GetPrerenderManager() const; |
| 269 | 268 |
| 270 int64_t GetBookmarkIdHelper(bool only_editable) const; | |
| 271 | |
| 272 JavaObjectWeakGlobalRef weak_java_tab_; | 269 JavaObjectWeakGlobalRef weak_java_tab_; |
| 273 | 270 |
| 274 // The identifier used by session restore for this tab. | 271 // The identifier used by session restore for this tab. |
| 275 SessionID session_tab_id_; | 272 SessionID session_tab_id_; |
| 276 | 273 |
| 277 // Identifier of the window the tab is in. | 274 // Identifier of the window the tab is in. |
| 278 SessionID session_window_id_; | 275 SessionID session_window_id_; |
| 279 | 276 |
| 280 content::NotificationRegistrar notification_registrar_; | 277 content::NotificationRegistrar notification_registrar_; |
| 281 | 278 |
| 282 scoped_refptr<cc::Layer> content_layer_; | 279 scoped_refptr<cc::Layer> content_layer_; |
| 283 chrome::android::TabContentManager* tab_content_manager_; | 280 chrome::android::TabContentManager* tab_content_manager_; |
| 284 | 281 |
| 285 scoped_ptr<content::WebContents> web_contents_; | 282 scoped_ptr<content::WebContents> web_contents_; |
| 286 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> | 283 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> |
| 287 web_contents_delegate_; | 284 web_contents_delegate_; |
| 288 | 285 |
| 289 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 286 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
| 290 | 287 |
| 291 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 288 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
| 292 }; | 289 }; |
| 293 | 290 |
| 294 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 291 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
| OLD | NEW |