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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void HandlePopupNavigation(chrome::NavigateParams* params); | 121 void HandlePopupNavigation(chrome::NavigateParams* params); |
122 | 122 |
123 bool HasPrerenderedUrl(GURL gurl); | 123 bool HasPrerenderedUrl(GURL gurl); |
124 | 124 |
125 void MakeLoadURLParams( | 125 void MakeLoadURLParams( |
126 chrome::NavigateParams* params, | 126 chrome::NavigateParams* params, |
127 content::NavigationController::LoadURLParams* load_url_params); | 127 content::NavigationController::LoadURLParams* load_url_params); |
128 | 128 |
129 bool HasOfflinePages() const; | 129 bool HasOfflinePages() const; |
130 void ShowOfflinePages(); | 130 void ShowOfflinePages(); |
| 131 void LoadOfflineCopy(const GURL& url); |
131 | 132 |
132 // Overridden from CoreTabHelperDelegate: | 133 // Overridden from CoreTabHelperDelegate: |
133 void SwapTabContents(content::WebContents* old_contents, | 134 void SwapTabContents(content::WebContents* old_contents, |
134 content::WebContents* new_contents, | 135 content::WebContents* new_contents, |
135 bool did_start_load, | 136 bool did_start_load, |
136 bool did_finish_load) override; | 137 bool did_finish_load) override; |
137 | 138 |
138 // Overridden from InstantServiceObserver: | 139 // Overridden from InstantServiceObserver: |
139 void DefaultSearchProviderChanged( | 140 void DefaultSearchProviderChanged( |
140 bool google_base_url_domain_changed) override; | 141 bool google_base_url_domain_changed) override; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 jobject jcontent_view_core); | 234 jobject jcontent_view_core); |
234 | 235 |
235 bool HasPrerenderedUrl(JNIEnv* env, jobject obj, jstring url); | 236 bool HasPrerenderedUrl(JNIEnv* env, jobject obj, jstring url); |
236 | 237 |
237 // Register the Tab's native methods through JNI. | 238 // Register the Tab's native methods through JNI. |
238 static bool RegisterTabAndroid(JNIEnv* env); | 239 static bool RegisterTabAndroid(JNIEnv* env); |
239 | 240 |
240 private: | 241 private: |
241 prerender::PrerenderManager* GetPrerenderManager() const; | 242 prerender::PrerenderManager* GetPrerenderManager() const; |
242 | 243 |
| 244 int64_t GetBookmarkIdHelper(bool only_editable) const; |
| 245 |
243 const offline_pages::OfflinePageItem* GetOfflinePage(const GURL& url) const; | 246 const offline_pages::OfflinePageItem* GetOfflinePage(const GURL& url) const; |
244 | 247 |
245 JavaObjectWeakGlobalRef weak_java_tab_; | 248 JavaObjectWeakGlobalRef weak_java_tab_; |
246 | 249 |
247 // The identifier used by session restore for this tab. | 250 // The identifier used by session restore for this tab. |
248 SessionID session_tab_id_; | 251 SessionID session_tab_id_; |
249 | 252 |
250 // Identifier of the window the tab is in. | 253 // Identifier of the window the tab is in. |
251 SessionID session_window_id_; | 254 SessionID session_window_id_; |
252 | 255 |
253 content::NotificationRegistrar notification_registrar_; | 256 content::NotificationRegistrar notification_registrar_; |
254 | 257 |
255 scoped_refptr<cc::Layer> content_layer_; | 258 scoped_refptr<cc::Layer> content_layer_; |
256 chrome::android::TabContentManager* tab_content_manager_; | 259 chrome::android::TabContentManager* tab_content_manager_; |
257 | 260 |
258 scoped_ptr<content::WebContents> web_contents_; | 261 scoped_ptr<content::WebContents> web_contents_; |
259 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> | 262 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> |
260 web_contents_delegate_; | 263 web_contents_delegate_; |
261 | 264 |
262 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 265 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
263 | 266 |
264 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 267 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
265 }; | 268 }; |
266 | 269 |
267 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 270 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
OLD | NEW |